Need help modifying an iLogic rule (Sort Bom in drawing)

Need help modifying an iLogic rule (Sort Bom in drawing)

cyndel.pigeon
Contributor Contributor
725 Views
2 Replies
Message 1 of 3

Need help modifying an iLogic rule (Sort Bom in drawing)

cyndel.pigeon
Contributor
Contributor

I'm doing an Ilogic to sort my BOM and the only step I'm missing is to renumber item and save item overrides to BOM.

I'm not familiar with Ilogic so I'm not able to make it right till the end.

I tried many things but it didn't work.

 

SyntaxEditor Code Snippet

Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument

Dim oPartsList1 As PartsList
oPartsList1 = oDrawDoc.ActiveSheet.PartsLists.Item(1)
oPartsList1.Sort("OES_BOM_Rank", 1, "PART NUMBER", 1)

 Someone knows what I should add ?

Thanks for your help !

0 Likes
Accepted solutions (1)
726 Views
2 Replies
Replies (2)
Message 2 of 3

Curtis_Waguespack
Consultant
Consultant
Accepted solution

Hi cyndel.pigeon,

 

Welcome to the forums.

 

You should be able to add these lines to the end of what you currently have:

oPartsList1.Renumber
oPartsList1.SaveItemOverridesToBOM

 

See this related link also:

https://forums.autodesk.com/t5/inventor-forum/ilogic-to-sort-bom-renumber-and-sort-parts-list/m-p/30...

 

Note too that the Inventor Customization forum is the better forum for ilogic and programming questions in the future:
http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120

 

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 3

cyndel.pigeon
Contributor
Contributor

It works !

However I had already tried with these lines included and it didn't work.

Not sure what I did wrong.

 

Thanks for your help!

 

0 Likes