Factory Design Utilities Forum
Welcome to Autodesk’s Factory Design Utilities Forums. Share your knowledge, ask questions, and explore popular Factory Design Utilities topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Factory Asset Update Wipes out BOM iLogic Results for Placed Vault Assets

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
petestrycharske
600 Views, 2 Replies

Factory Asset Update Wipes out BOM iLogic Results for Placed Vault Assets

All,

 

Good morning!  I'm working on a client project, so I can't post the assets or layout here, but perhaps could knock out an example later on.  So for now, I"ll just describe the problem and I've added a couple of screenshots down below.

 

I've got an assembly asset that has supporting framing and the customer only wants a count on how much supporting material is needed.  Therefore, I have an iLogic rule that calculates the width and height of object and adds that together to get the framing quantity, which is reported as feet.  That value follows simple rounding rules, since the base unit is 1 foot, and will round either up or down to the nearest foot.  That was how the original asset was published and is working beautifully.

 

However, I realized this morning that it would probably be better that the value always round UP to the next foot so that there is always enough support material.  So, I used the Edit option for my asset to make the changes to the iLogic rule to simply add a ceiling function "ceil()" to make calculation to always push the value to the next foot.  No problems there and it tested out nicely inside the asset and then published my changes back to the Vault library.

 

Unfortunately, when I updated the assets already placed into the drawing, the BOM information went to 0.  I then have to edit the asset and run the rule myself, which may involve checking out the asset, and that gets the BOM quantities back.  Is this the correct procedure when updating Assembly assets with BOM logic inside of them?  I just want to make sure I understand the proper procedure for this, so I can explain it to the client. 

 

I've attached some screenshots below of the general process and I can try to replicate with a generic model later on.  Just wanted you to see if anyone else has noticed this and can comment.  If you have any questions, please do not hesitate to contact me.  Hope all is well and have a most blessed day!

 

Peace,

Pete

Just a guy on a couch...

Please give a kudos if helpful and mark as a solution if somehow I got it right.
2 REPLIES 2
Message 2 of 3

All,

 

Just to add some additional information, I created a new layout and placed a new copy of the updated asset into that layout.  As soon as I sized it to the same size as the version in the other layout, the one I had problems with, the new asset BOM quantities also went to 0.  Does this mean that EVERY pre-existing placed asset would have to be checked and updated?  Again, I'll try to get a generic example knocked out here and will let you know.  Hope all is well and have a most blessed day!

 

Peace,

Pete

Just a guy on a couch...

Please give a kudos if helpful and mark as a solution if somehow I got it right.
Message 3 of 3

All,

 

Good afternoon!  Thanks to Autodesk, we were able to get this going.  Apparently in my previous iLogic code, I had been switching the BOM state of the root part and not just the assembly occurrence.  When I updated the assets, it apparently defaulted back to the BOM state of the root part, based on whatever the parameter values were at the time the asset was published.  This is why I could get certain versions of the assets to update, as long as their parameters were chosen when I published the asset.  Here is an example of the code I used and the correction.

 

 

Original Code:

 

Component_Comp = Component.InventorComponent("Component_XXX")

Dim Component_Count As Integer

 

(There is logic here to create an accurate count based on the parameter values selected and then assigned to Component_Count, which I'm not adding here because it is very specific)

 

'Set the BOM structure and the Quantities
Component_Comp .Definition.BOMStructure = 51970  'Sets BOM Structure to Normal (Includes Component on BOM)
ThisBOM.OverrideQuantity("Model Data", "Component_XXX", Component_Count)
If Component_Count = 0 Then
    Component_Comp.Definition.BOMStructure = 51972  'Sets BOM Structure to Reference (Excludes Sub-Components on BOM)
End If

 

 

 

The Revised Code (I'm putting the major items in Bold):

 

'Set up for the assembly BOM controls
Imports Inventor.BOMStructureEnum

 

Component_Comp = Component.InventorComponent("Component_XXX")

Dim Component_Count As Integer

 

(There is logic here to create an accurate count based on the parameter values selected and then assigned to Component_Count, which I'm not adding here because it is very specific)

'If the component is to be active

Component_Comp.BOMStructure = kDefaultBOMStructure  'Sets BOM Structure to Normal (Includes Component on BOM)

 

If Component_Count = 0 Then
    Component_Comp.BOMStructure = kReferenceBOMStructure  'Sets BOM Structure to Reference (Excludes Sub-Components on BOM)
Else
    ThisBOM.OverrideQuantity("Model Data", "Component_XXX", Component_Count)
End If

 

 

By rearranging the If / Then statement and using the k...BOMStructure, the code ran more efficiently too.  Really specially thanks to Oleg Dimerman, Yizhou Cao and Mike Deck, all with Autodesk!  If I knew of a way to give them credit for the solution, I would definitely do it.  Thanks for all the support and hope this helps someone else out!  If you have any questions, please do not hesitate to contact me.  Hope this helps and have a most blessed night!

 

Peace,

Pete

Just a guy on a couch...

Please give a kudos if helpful and mark as a solution if somehow I got it right.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report