BOM Quantity Based On Number of Assemblies

BOM Quantity Based On Number of Assemblies

Anonymous
Not applicable
1,272 Views
5 Replies
Message 1 of 6

BOM Quantity Based On Number of Assemblies

Anonymous
Not applicable

This might be something that's been covered before, but it's Friday, my brain took a vacation day and i can't seem to find the answer anywhere else.

 

When you open the BOM (or Parts List) for an Assembly, it will show you all of the quantities for each part that is required to build one Assembly. I need to find a way to make the BOM show these quantities based on the number of assemblies required. The number of assemblies is entered as a custom iProperty and will vary every time the model is used.

 

I know that i can use ThisBOM.OverrideQuantity in iLogic, but the assembly I'm working with is flexible and contains patterns. So i can't use the code to set static quantities because the quantities vary based on the patterns and some parts might not be part of the assembly when it's finished.

 

Manually updating the quantities in the BOM is NOT an option either.

 

Any thoughts??

0 Likes
1,273 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable

Just a thought, but starting from the assembly iterate through all the referenced documents to get the total number of occurances, then get the number of assemblies from your custom iProperty and multiply by the number of occurances

 

To illustrate -

 

Dim oAssDoc As AssemblyDocument
Set oAssDoc = ThisApplication.ActiveDocument

 

Dim oDocs As DocumentsEnumerator
Set oDocs = oAssDoc.AllReferencedDocuments

Dim oDoc As Document

 

Dim oOccs As ComponentOccurrencesEnumerator

Set oOccs = oAssDoc.ComponentDefinition.Occurrences.AllReferencedOccurrences(oDoc)

 

oNoOfParts = oOccs.count * oCustomPropSet.Item("NoOfAssemblies").Value

 


 

0 Likes
Message 3 of 6

Anonymous
Not applicable

Does any assembly have all the occurrances you need to count?  I am getting ready to release a addin that allows you to select a drawing view, and then any assembly and it creates a partslist with the qty from the selected assembly that are in that view.

0 Likes
Message 4 of 6

Anonymous
Not applicable

I have asked that question for 2 years at every AutoDesk convention in Las Vegas and have yet to find an answer, even tho i am always told how simple it should be, so when someone figures it out please let me know.

0 Likes
Message 5 of 6

Anonymous
Not applicable

Why not create new assembly with component pattern of the YourQTY of your assembly and use its BOM?

 

0 Likes
Message 6 of 6

Anonymous
Not applicable

This is what I found works for my particular needs. Since my assembly will always have the same static parts in it (5 parts total), I can set a parameter for each part that is equal to the bom qty *  the # of assemblies. Then I can override the bom qty with that parameter. See below...

 

A_Count <-- # of Parts * # of Assemblies

A_Part <-- Part Name

Asm_Qty <-- # of Assemblies

 

A_Count = ThisBOM.CalculateQuantity("Model Data", "A_Part") * Asm_Qty

ThisBOM.OverrideQuantity("Model Data", "A_Part", A_Count)

 

(This code is executed in the assembly)

0 Likes