Commands › › Family Swap
Family Swap
Coming soon
Before you run this
Active document must be open. Target element must be a FamilyInstance. Target family must be loaded in the document.
After it runs
The specified family instance is swapped to the target family/type. Result JSON contains previous and new family/type info.
When to use this
- User wants to swap a fitting or fixture to a different family.
- User wants to change the type of an existing family instance.
- AI needs to programmatically replace a family instance during a workflow.
Don't use this when
Swapping MEP system types (use system type commands). Batch-swapping all instances of a family (use a batch command). Loading new families into the document (use a load family command).
Inputs
| Name | Kind | Type | Required | Default | Description |
|---|---|---|---|---|---|
elementId |
config | int |
no | — | Element ID of the family instance to swap |
familyName |
config | string |
no | — | Target family name |
typeName |
config | string |
no | — | Optional target type name within the family |
Returns
| Name | Type | Description |
|---|---|---|
Result | JSON | Swap result with previous/new family and type |
What you'll see in the chat
on start
Swapping the family instance...
Changing family type...
Changing family type...
thinking
Validating element and target family...
Performing the family swap...
Performing the family swap...
on success
Swapped element {elementId} from {previousFamily} to {newFamily}.
on failure
Family swap failed: {error}
REST API
Not yet exposed
This command does not carry a [RestApi] attribute today. Once tagged, this section will auto-populate with:
POST /api/v1/commands/family_swap- Request body schema (from
[RestApiParam]) - Response schema (from
[RestApiResponse]) - curl / JS / Python code examples
Keywords & intent patterns
swap family · change family · replace family · family swap · change type
Patterns: swap * family · change * family · replace * family · swap * type
Related
| Related commands | LoadFamilyCommand |
|---|---|
| Pillar |