Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
FINET_Laurent
in reply to: Daan_M

@Daan_M,

 

Are we talking about this ? (sorry for baguette language) :

FINET_Laurent_0-1695907710837.png

Here above a part with two solids. The folowing code is giving the correct output :

Dim file As String = "X:\XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\Pièce2.ipt"

Dim doc As Inventor.PartDocument = ThisApplication.ActiveDocument
Dim pcd As Inventor.PartComponentDefinition = doc.ComponentDefinition

Dim def As Inventor.DerivedPartDefinition = pcd.ReferenceComponents.DerivedPartComponents.CreateUniformScaleDef(file)
def.MirrorPlane = kDerivedPartMirrorPlaneYZ

Dim der As Inventor.DerivedPartComponent = pcd.ReferenceComponents.DerivedPartComponents.Add(def)
der.BreakLinkToFile()

FINET_Laurent_1-1695907950827.png

 

Can you maybe provide a part that is not working ? 

Maybe add this line ? :

def.IncludeAllSolids

 

Kind regards,

FINET L.

If this post solved your question, please kindly mark it as "Solution"

If this post helped out in any way to solve your question, please drop a "Like"

@LinkedIn     @JohnCockerill