Reply

Create Inter-Part copy

[ Edited ]

Hi,

I'm trying to create an inter part copy of an assembly using the API, but I can't find the way to do it.

 

Assume I have the assembly file: "a.asm"

I want my program to create a new .par file, and insert it an inter part of "a.asm".

 

How can this be done? I'm writing the code using VB.Net

 

Thanks!

1 REPLY

Re: Create Inter-Part copy

From what you describe, you probably mean PartCopy and not InterpartCopy!

To insert a part copy, you also have to decide, if you want to include the geometry as design body or as construction geometry. Either cases can be done easily through API, like you can see below:

 ' PAR: Insert PartCopy of assembly as "merged" design body
 Dim objPart As PartDocument = objApp.ActiveDocument
 objPart.Models.AddCopiedPart("C:\TEMP\a.asm")

To insert the assembly as constructions, use the code below:

 

' PAR: Insert PartCopy of assembly as construction bodies
Dim objPart As PartDocument = objApp.ActiveDocument
objPart.Constructions.CopyConstructions.Add("C:\TEMP\a.asm")