Assembles a model (as a component feature) into a container Assembly in the CAD environment.

This version uses specific constraint information configurations on the Assembly and the Component to assemble.
This overload allows very detailed parameters to be specified.


ContainerModel (string) - the model name to assemble the component into

ComponentFileName (string) - the model that is applied/inserted.

ConstraintInfos (constraint object or array) - 1 or more CreoConstraintInfo Objects that define the constraint structure. Datum Style constraints require 3 objects, Coordinate System style require only one.

Return Value

The newly created Feature ID (integer)


Use the Right Click Menu "Insert CAD Object Templated" to create the CreoConstraintInfo objects.


Dim NewID as integer
NewID = CAD.Comp.Assemble("asm0001.asm","prt0001.prt", {"CD1","CD2","CD3"},{"AD1","AD2","AD3"}, False)

' -------- or -----------

Dim NewID as integer
NewID = CAD.Comp.Assemble("asm0001.asm","prt0001.prt",{"CD1","CD2","CD3"},{"AD1","AD2","AD3"}, False)

' -------- to add component to a subassembly -----------
' -------where 40 is the component id in the assembly-----

Dim NewID as integer
CAD.Comp.Assemble("asm0001.asm", "prt0001.prt",{"CD1","CD2","CD3"},{"AD1","AD2","AD3"}, False))