Skip to main content

insert()

Place a part or sub-assembly definition in the current assembly.

Units: a part built from a file with a different unit() than the project is rescaled into the assembly's unit at render time — an inch part inserted into an mm project renders 25.4× larger, connectors and all, with the instance pose untouched. Parameter overrides are NOT converted: insert(def, { width: 10 }) reads 10 in the PART's unit (10 in for an inch part), whatever the assembly runs in — the values feed the part's own param() calls, whose numbers are the part file's numbers.

Returns: Instance | Occurrence

tip

See the guide for detailed usage examples.

Signatures

insert(definition: PartDefinition<T>, overrides?: ParamOverrides): Instance<T>

Place a part or sub-assembly definition in the current assembly.

Units: a part built from a file with a different unit() than the project is rescaled into the assembly's unit at render time — an inch part inserted into an mm project renders 25.4× larger, connectors and all, with the instance pose untouched. Parameter overrides are NOT converted: insert(def, { width: 10 }) reads 10 in the PART's unit (10 in for an inch part), whatever the assembly runs in — the values feed the part's own param() calls, whose numbers are the part file's numbers.

ParameterTypeDescription
definitionPartDefinition<T>
overridesParamOverrides(optional)

insert(definition: Assembly<T>, overrides?: ParamOverrides): Occurrence<T>
ParameterTypeDescription
definitionAssembly<T>
overridesParamOverrides(optional)

insert(part: P, overrides?: ParamOverrides): Instance<P>
ParameterTypeDescription
partP
overridesParamOverrides(optional)