hi, I found a issue that vba reads bom in different way when I tried to export bom to excel. here is the routie i am using for BOM. I am using inventor 2012 sp1, window 7 sp1 and excel 2007
1. create a assembly with bom structured view enabled.
2. open BOM editor in structured view tab. sort BOM by part number, and renumber them from 1,2,3....
3. save and exit.
4. in vba, i used code below
For Each oRow In oStructuredBOMView.BOMRows
Set oDoc = oRow.ComponentDefinition(1).Document
on the export bom excel sheet, the item order is different from BOM in assembly file. on the excel sheet, the order of item number is same before sorting and renumber BOM. It seems to me that BOM editor didnt remember sorting and renumber. is this a bug? or any fix? thanks for any suggestions.
anyone have an idea on this issue? thanks
I am encountering with the same problem, have no idea how to come over this within Inventor. Might have to be customised via VBA in excel??
There seems to be a break down in tech support.
You may develop one function (GetMyBOMRow) that returns BOMRow object with specified ItemNumber and another subroutine (ExportBOMRowToExcel) that exports specified BOMRow data into the Excel sheet.
Then you may export data row by row in the desired order using For – Next loop:
For i = 1 to NMax oBOMRow = GetMyBOMRow(i) call ExportBOMRowToExcel(oBOMRow) Next i
Here NMax is the maximal item number value in BOMRows collection.
Access a broad range of knowledge to help get the most out of your products and services.