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

This version uses 3 Datum references on the Assembly and the Component to assemble.
Use the other version of this method to assemble by Coordinate Systems.

Parameters

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

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

ComponentDatums (string array) - The names of 3 Datum References on the component

AssemblyDatums (string array) - The names of 3 Datum References on the assembly

FixMissingWithUI (Boolean optional default true) - If true then the system will pause when one or more datum references are not found to fix the issue. False will cause an exception to be thrown with information on what was not found.

Return Value

The newly created Feature ID (integer)

Remarks

ComponentDatums and AssemblyDatums MUST be an array of 3 items each for this routine to function correctly, an Exception will be thrown if the size of the array's is anything but 3 items.

Examples

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))