- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Is it possible to show the number of bends in a sheet metal part using iLogic?
Thanks
Solved! Go to Solution.
Hi,
Is it possible to show the number of bends in a sheet metal part using iLogic?
Thanks
Solved! Go to Solution.
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
@Anonymous
Cool, that worked.
One more question, I know I know but I'm currently learning how to find information in the Inventor APIs.
Is it possible to identify howmany bends are 90° and howmany are other than 90°?
Thanks a lot.
I found the BendRadius property in the API but I don't know how to use it.
Dim oPartDoc As PartDocument = ThisApplication.ActiveDocument
Dim oCompDef As SheetMetalComponentDefinition = oPartDoc.ComponentDefinitions.Item(1)
Dim oBendCount As String = oCompDef.Bends.Count
Dim oBendRadius As Parameter = oCompDef.BendRadius
MessageBox.Show("Bend Total: " & oBendCount)
MessageBox.Show(oBendRadius)