I'm a newbie to iLogic. My task consist in exporting a BOM of an iLogic assembly. I've doing some research with no luck.
Is any way to get an accurate BOM of other LOD other than the master. If so, is it only available in certain Inventor releases?
I am trying to acomplish this thru API, but I get error when in different LOD than master.
iLogic assembly has some parts supress thats why we need to create a new BOM
Thanks in advace,
You can export the BOM, but you can only do it from the Master LOD. In spite of the fact that you are exporting from the Master LOD, if you are using iLogic functions to suppress components then they will also be removed from the BOM. iLogic sets their BOM structure to Reference. Here is a sample rule to export the BOM. It should work in Inventor 2009, 2010 or 2011.
Dim doc as AssemblyDocument = ThisDoc.Document
If doc.ComponentDefinition.RepresentationsManager.ActiveLevelOfDetailRepresentation.LevelOfDetail <> LevelOfDetailEnum.kMasterLevelOfDetail Then Return
Dim bomName As String = ThisDoc.PathAndFileName(False) + "-Bom.xls"
ThisBOM.Export("Parts Only", bomName, kMicrosoftExcelFormat)
This rule function:
Component.IsActive("PartA:1") = False
will change the BOM Structure of the component PartA:1 to Reference. It's not a temporary change. It will last until you use:
Component.IsActive("PartA:1") = True
It affects the assembly that the rule is running in. It doesn't change the BOM structure within the part file itself. It only changes the BOM structure of the component occurrence in the assembly.
Thanks for the clarification.
Just to add to this: setting the BOM structure of the component occurrence for sub assemblies can impact the next level up as well. This may result in unexpected results if the difference in the way the BOM handles LOD and Reference BOM structure is not understood.
So anyone using this method should understand that mixing LOD and Reference BOM structure is not a truly apples to apples solution, IMO.
Can you give more details of how the problem would show up? I would like to find a way to work around it if possible.
The scenario I'm thinking of would occur when the user wants to suppress a component in a LOD and output a BOM (using LOD to detail configurations). If another (existing) configuration used the component (as unsuppressed), it's BOM structure would now omit that component because the iLogic has toggled the concurrence BOM structure to Reference.
Now mix in sub assemblies with Phantom or Inseparable default structures where the child components are listed and things get a bit more messy.
Some investigation into the temporary LODs that are created when a child of a sub assembly is suppressed from the top level assembly would need to be considered also.
The need for LOD BOM tools to allow users to work with assembly configurations has been expressed over and over, but I'm not sure using the Reference occurrence toggle is the safest approach. Having said that, I wouldn't be surprised to see you come up with some iLogic wizardry to address this! I'll follow it with interest.
that is exactly what I am trying to do.
Master LOD has all the components. iLogic LOD should have some components supressed.
User wants to have 2 separates BOMs (1 for Master, 1 for iLogic).
My current code works for Master LOD. But when ActiveDocument is iLogic LOD the codes crash at line.
Set obomview = obom.BOMViews.Item("Structured")
Thanks
@Anonymous wrote:that is exactly what I am trying to do.
Just so you know Autodesk has stated many times that LODs are not intended to be used to create assembly configurations. The correct tool for that is iAssemblies.
Having said that, I think it's clear to most that LODs are a natural choice for creating configurations, and it would nice to see the LOD tools and BOM tools play better together.
hi,
This is good code. But I need to export all level. and how to export " reference" part/subassembly to excel.
I tried inventor BOM export. it won't export reference component.
thanks,
nanda