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

Hey there fsdolphin,
 
 
 
This was quick and dirty but it should get you what you need.  I didn't fully test it so there is a slight chance there may be some features it doesn't recognize but I did test with normal flanges and contour flanges.  I would think this is where the bend id's come from for tagging in a drawing so I think we're pretty safe.

 

 

SyntaxEditor Code Snippet

Dim oPartDoc As PartDocument
oPartDoc = ThisApplication.ActiveDocument

Dim oCompDef As SheetMetalComponentDefinition
oCompDef = oPartDoc.ComponentDefinitions.Item(1)

oBendCount = oCompDef.Bends.Count

MsgBox("Bend Total: " & oBendCount)

 

Thanks,

Randy