iLogic Assy BOM sort by 3 columns

iLogic Assy BOM sort by 3 columns

Anonymous
Not applicable
2,626 Views
6 Replies
Message 1 of 7

iLogic Assy BOM sort by 3 columns

Anonymous
Not applicable

Hello all,

I know this has already been adressed, with no solution, but I am hoping that somebody will see this and maybe help me out.

 

I have an iLogic configurater Assembly with parts getting suppressed and activated. I got to the point, where I have my assembly, and i want to sort, renumber end export the BOM Structured view. I thought it will be a simple thing....

 

Look at the code I have now.

 

Dim oDoc As AssemblyDocument
oDoc = ThisApplication.ActiveDocument

Dim oAssyDef As AssemblyComponentDefinition
oAssyDef = oDoc.ComponentDefinition

Dim repMgr As RepresentationsManager
repMgr = oAssyDef.RepresentationsManager

Dim oMasterLOD As LevelOfDetailRepresentation
oMasterLOD = repMgr.LevelOfDetailRepresentations.Item(1)
oMasterLOD.Activate
 
Dim oBOM As BOM
oBOM = oAssyDef.BOM
 
oBOM.StructuredViewEnabled = True

oBOMView = oBOM.BOMViews.Item("Structured")

oBOMView.Sort("BOM Structure",1,"Vendor",1,"Part Number",1)

oMasterLOD = repMgr.LevelOfDetailRepresentations.Item(5)
oMasterLOD.Activate
   
oDoc.Save

 

The problem is that it is not sorting based on 3 columns (BOM Structure, Vendor, Part Number). It is only sorthing based on the first criteria (BOM Structure), which is not enough for me.

 

Invento Programing help says it should work, but it dosn't.

 

Does anybody have  a solution for this?

 

Is this maybe working on the  drawing sheet (I am thining that maybe i will sort, renumber and export from there.) ?

 

Thank you.

0 Likes
Accepted solutions (1)
2,627 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable
Accepted solution

Hey

 

I managed to solve my own problem 😄

 

You can sort by 3 criteria on a drawing part list and export from there.

 

My Work flow is the following:

   - generate de model

   - open it's drawing

   - Sort the BOM

   - Renumber

   - Override the assembly Bom Item numbers according to drawing part list.

   - save and close the drawing

   - sort the assembly BOM by Item

 

 

I attached the Assy rule and the drawing rule with some coments.

 

 

 

Hope this helps.

0 Likes
Message 3 of 7

Mark_Fry
Participant
Participant

Hi SA,

I know that it has been a long time since you posted about your ilogic BOM requirements, but I am just now trying to get my head around ilogic. I have been asked to try and come up with a solution to a similar BOM output. My requirements are for example a stairway, to list all the different steal sizes used to create said stairway and be able to total up these sizes to give a total length of steel for each size for steel ordering and to have this in a file which can be printed out.

Do you think that this could be achieved? Could your solution be modified to provide the extra information?

 

Regards,

Mark

0 Likes
Message 4 of 7

ankurGCK9S
Contributor
Contributor

Hi, SoulAsasin,

 

I have tried to use your ilogic rule for assembly, But it gives me an error as below 

"

Rule Compile Errors in Assy Rule, in 191048-MF-088.iam

Error on Line 37 : End of statement expected."

 

Let me know if I miss anything. I wanted to sort the BOM in a certain order such as > part Number,  description etc and thought your rule may be a good start. 

 

 

0 Likes
Message 5 of 7

Curtis_Waguespack
Consultant
Consultant

Hi @ankurGCK9S ,

 

Welcome to the forum. The error you mention indicates that you likely did not get all of the lines copied to your rule... check the original code to see if it matches what you have and note that the last line reads: oDoc.Save

 

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

EESignature

0 Likes
Message 6 of 7

ankurGCK9S
Contributor
Contributor

Hi Curtis,

 

Sorry for the delay in response and Thank you for the reply. I just add text file to my external rules and try to run it but it did not work. 


@Curtis_Waguespack wrote:

Hi @ankurGCK9S ,

 

Welcome to the forum. The error you mention indicates that you likely did not get all of the lines copied to your rule... check the original code to see if it matches what you have and note that the last line reads: oDoc.Save

 

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


 

0 Likes
Message 7 of 7

rhasell
Advisor
Advisor

Hi

I have no idea what the code does, but if you comment out the "S" on line 73, the error goes away. I am unable to test the code due to my environment not being the same. (The "S" might mean something, but I am unable to debug it.)

 

Capture5.JPG

Reg
2026.1
0 Likes