- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Export or Access to BOM which is applicable to an LOD
Hi,
Is it possible to access and export a BOM based on a specific LOD?
I would like to export the information of the parts which are active because of the current active LOD. It could be Parts Only or Structured with all levels etc but as long as its only the parts pertaining to that specific active LOD.
Is this possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
The BOM in the Inventor API is always based on the Master LOD and suppressing components do not change the listing in BOM. Maybe creating an iAssembly would meet your requirement. (Manage tab > Create iAssembly). This provides a way to include/exclude components and which reflects in BOM.
This link has steps explaining an iAssembly creation :
https://designandmotion.net/autodesk/mfg-pages/inventor/autodesk-inventor-iassembly-best-practices/
After you have created an iAssembly, a table will appear in the model browser that can be edited to include/exclude components. After you activate a table row, the updated BOM can be viewed.
Another approach would to use the Inventor API to iterate through all of the occurrences and export what you want from the occurrences to an Excel worksheet. An occurrence has a suppressed property so you could exclude the suppressed occurrences. See this VBA example in the help: AssemblyCount()
That example will fail on this line if there is a suppressed occurrence: "If oCompOcc.SubOccurrences.Count = 0 Then"
Edit the example with another If Else statement that checks the suppressed property to avoid that error:
>> >>
For Each oCompOcc In oCompDef.Occurrences
If oCompOcc.Suppressed = True Then
Debug.Print oCompOcc.Name & "Suppressed = " & oCompOcc.Suppressed
Else
' Check if it's child occurrence (leaf node)
If oCompOcc.SubOccurrences.count = 0 Then
Debug.Print oCompOcc.Name
iLeafNodes = iLeafNodes + 1
Else
Debug.Print oCompOcc.Name
iSubAssemblies = iSubAssemblies + 1
Call processAllSubOcc(oCompOcc, _
sMsg, _
iLeafNodes, _
iSubAssemblies) ' subassembly
End If
End If
Next
<< <<
The example in this post writes to an Excel worksheet. (not related to exporting a BOM)
http://adndevblog.typepad.com/manufacturing/2013/02/manipulate-rows-and-columns-of-ipart-1.html
Thanks,
Wayne
Wayne Brill
Developer Technical Services
Autodesk Developer Network
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Wayne,
Thanks for the feedback. Ok so clearly the LOD system inside Inventor is not built to handle assy configurations. Its a pitty cause its so quick and easy to set up and use.
I will look at the options you provide