Renumber BOM iLogic/API question

Renumber BOM iLogic/API question

mdavis22569
Mentor Mentor
679 Views
3 Replies
Message 1 of 4

Renumber BOM iLogic/API question

mdavis22569
Mentor
Mentor

I'm looking to see if anyone has done Ilogic 

 

Where I could have a pop up ...or something that would allow me to change the Structuring BOM numbers

 

Right now when I make my Parts List/BOM ..

 

it's like this:

 

capture 2.JPG

 

However we need to have it start value at 10 and do it in increments of 10

 

Capture.JPG

 

as we're doing our assemblies it's common for it to change and reset back to 1 ...so I'm looking at how to set up an ilogic so I can input those values in quickly and it updates, vs making a Parts List, going into the BOM, going to the structured tab and inputting in the values everytime.

 

 

Mike

 

 

 

 

 

thanks,

Mike 

 

 


Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------
Mike Davis

EESignature

0 Likes
Accepted solutions (2)
680 Views
3 Replies
Replies (3)
Message 2 of 4

Curtis_Waguespack
Consultant
Consultant
Accepted solution

Hi mdavis22569,

 

This should do it:

 

oBOMView = ThisDoc.Document.ComponentDefinition.BOM.BOMViews.Item("Structured")
Call oBOMView.Renumber(10, 10)

 

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

EESignature

0 Likes
Message 3 of 4

mdavis22569
Mentor
Mentor

Thank you @Curtis_Waguespack worked great ... 

 

Question is there a change I can do to it ..so it can work also on the IDW side as a 2nd option?   

 

Thank you too!!! I greatly appreciate it!


Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------
Mike Davis

EESignature

0 Likes
Message 4 of 4

Curtis_Waguespack
Consultant
Consultant
Accepted solution

 

You're quite welcome!

 

Here's a version that you can run from the drawing:

 

'define the model (gets the first model in the drawing, if there is more than 1)
oModelDoc = ThisDrawing.ModelDocument

'get the structured BOM view
oBOMView = oModelDoc.ComponentDefinition.BOM.BOMViews.​Item("Structured")

'renumber the BOM
Call oBOMView.Renumber(10, 10)

'update the drawing (parts list, balloons, etc.)
InventorVb.DocumentUpdate()

EESignature

0 Likes