insert_component
Insert a part or sub-assembly into the active assembly at specified XYZ coordinates. Subsequent components require mating to avoid floating parts.
Instructions
Insert a part or sub-assembly into the active assembly at the given XYZ.
IMPORTANT (mate-or-incomplete): insert_component alone does NOT finish the job. The FIRST component in an assembly is auto-fixed, but every subsequent component needs ≥1 mate (concentric / coincident / distance, or the composites stack_components / add_mate_by_face_position) before the assembly is valid. An assembly with floating components is wrong even if the iso view looks placed correctly. If you can't identify mating entities at insert time, call get_active_assembly_info first or ASK the user — don't push a floating component. See ASSEMBLY_DESIGN.md for the full SKELETON → MATE PLAN → INSERT+MATE → VERIFY loop.
Args: file_path: Absolute path to the .sldprt or .sldasm to insert. x_mm, y_mm, z_mm: Insertion point in mm (assembly frame). config_name: Specific source-document configuration to use; empty string uses the source's currently-active configuration.
Returns the inserted component's instance metadata.
Related: add_concentric_mate, add_coincident_mate, add_distance_mate, stack_components (3 mates in one call for stacked pairs), add_mate_by_face_position (no-entity-name convenience).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x_mm | No | ||
| y_mm | No | ||
| z_mm | No | ||
| file_path | Yes | ||
| config_name | No |