Inventor Customization

Reply
Valued Mentor
jcneal
Posts: 324
Registered: ‎04-10-2010
Message 1 of 4 (254 Views)

BOM different order on export

254 Views, 3 Replies
10-22-2011 07:59 PM

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.

Autodesk Inventor Professional 2014
Autodesk Product Design Suite Standard 2013
Microsoft Office 2007 & 2013
Windows 7 64bit
Synergis Adept 2013
Visual Studio Express 2010
Valued Mentor
jcneal
Posts: 324
Registered: ‎04-10-2010
Message 2 of 4 (234 Views)

Re: BOM different order on export

10-27-2011 03:34 PM in reply to: jcneal

 anyone have an idea on this issue? thanks

Autodesk Inventor Professional 2014
Autodesk Product Design Suite Standard 2013
Microsoft Office 2007 & 2013
Windows 7 64bit
Synergis Adept 2013
Visual Studio Express 2010
Active Contributor
Kris_Inv2013
Posts: 39
Registered: ‎07-19-2012
Message 3 of 4 (132 Views)

Re: BOM different order on export

11-20-2012 12:42 AM in reply to: jcneal

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.

ADN Support Specialist
Vladimir.Ananyev
Posts: 458
Registered: ‎08-14-2012
Message 4 of 4 (113 Views)

Re: BOM different order on export

11-27-2012 05:49 AM in reply to: Kris_Inv2013

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.


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube