replace_component
Swap a top-level assembly component with another .sldprt or .sldasm in place, automatically reattaching mates where possible and reporting broken mates with candidate faces for remating.
Instructions
Swap a top-level component for another .sldprt or .sldasm, in the same place.
SolidWorks re-attaches each mate to the new part's matching face where it can. Returns the new component, the mates kept, and the mates that broke or went: each with its type, the other components, and what it held on the old part (the face's type, normal or axis and centre in the component's own frame), plus up to three candidate faces on the new part ('#index', nearest first). Re-mate with delete_mate and add_mate(mates=[...]).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| component | Yes |