07-28-2015
01:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-28-2015
01:13 PM
Hi,
Is it possible to show the number of bends in a sheet metal part using iLogic?
Thanks
Solved! Go to Solution.
07-28-2015
01:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-28-2015
01:42 PM
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
07-29-2015
05:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-29-2015
05:39 AM
@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.
07-30-2015
10:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-30-2015
10:56 AM
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)