Hi Everyone,
I'm trying to export BOM using iLogic, but when it comes to iAssemblies, it exports the QTY's for all the iAssembly members. I'm trying to define the BOMView iAssembly member like so:
Dim oDocument As AssemblyDocument = ThisApplication.ActiveDocument
Logger.Trace(oDocument.ComponentDefinition.iAssemblyMember.Row.MemberName)
Dim oBOMView As BOMView = oDocument.ComponentDefinition.BOM.BOMViews.Item("Structured")
If Not oDocument.ComponentDefinition.iAssemblyMember Is Nothing Then oBOMView.iAssemblyMemberName= oDocument.ComponentDefinition.iAssemblyMember.Row.MemberName
oBOMView.Export("C:\Users\Ilyas\Desktop\test.xlsx", kMicrosoftExcelFormat)
But I'm not able to get the iAssembly name. Does anyone know the trick?
Regards
Ilyas
I managed to get the active iAssembly name via:
oDocument.ComponentDefinition.iAssemblyFactory.DefaultRow.MemberName
However, it didn't really help with the final BOM export. Is there an option in the Export to use a specific iAssembly member?
Hi @ilyas_adnm
Place the iassembly member into an assembly and export the bom from there. Or maybe you could try opening the member document manually and see if the bom is available for export. If it is then replicate by code.
Hi @A.Acheson,
Thank for the suggestions. I would consider these as a possible workaround for getting the particular iAssemblyMember BOM.
But the thing is, I already have a script that does a few things before and after it exports, the BOM. I'm hoping to minimize the change to the existing code and see if I can just tweak the export function to get the active iAssemblyMember.
Regards
Ilyas
Can you get the correct bom to export manually from within the factory file?
Hi @A.Acheson,
Yes, if I export using the Export BOM icon in the BOM window, it only exports the active iAssemblyMember QTY column only.
Regards
Ilyas
Can't find what you're looking for? Ask the community or share your knowledge.