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

@Anonymous,

 

 

If the parts created inside weldment, sketch proxy need to create with reference occurrence (part) of weldment. Try below code to setIncludestatus of 3D sketch (it is working for attached weldment assembly).

 

Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveDocument

Dim oSheet As Sheet
oSheet = oDoc.ActiveSheet

Dim oView As DrawingView
oView = oSheet.DrawingViews.Item(2)

Dim oReferDoc As AssemblyDocument
oReferDoc = oView.ReferencedDocumentDescriptor.ReferencedDocument

Dim occ As ComponentOccurrence
occ = oReferDoc.ComponentDefinition.Occurrences.Item(3)

Dim oDef As PartComponentDefinition
oDef = occ.Definition

Dim oProxy As Sketch3DProxy
Call occ.CreateGeometryProxy(oDef.Sketches3D.Item(1), oProxy)

Call oView.SetIncludeStatus(oProxy, True)

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network