Inventor General Discussion

Inventor General Discussion

Reply
Valued Contributor
gazadder
Posts: 64
Registered: ‎05-11-2007
Message 1 of 8 (656 Views)

Drawing mass update issue

656 Views, 7 Replies
11-20-2013 03:54 AM

I am having problems keeping the correct mass of the model updated in its drawing. There are three ways of which I have tried to update the mass on the drawing but all have issues:-

 

1:            When the model has finished updating using ilogic the last rule then takes the Iproperties Mass and writes it to a parameter. Using ilogic the drawing then automatically opens and updates one of the rules in the drawing to write the mass from the model parameter to the drawing custom iproperties and updates text in the title block that represents mass.

 

Issue with this method:  If the user manually adds a part to the assembly then the parameter is not updated with the new mass.

 

I have also tried an event trigger to fire the “Read Mass Rule” when an iproperty Change however the Mass seems to be not regarded as an iproperty change.

 

 

2:            Directly bring in the Physical Properties – Mass in the Format text box within the drawing so it is directly linked.

 

Issues with this method:  

 

  • Initially if when the model has fully updated and the drawing is automatically opened the correct mass is present. However, if the drawing is manually re-opened the text states “N/A”. And the user has to remember to re-open the model and update the mass.

 

  • The update mass often doesn’t work anyway when the user has the drawing and model open and is manually adding parts. No matter how many times the user presses update mass the drawing stills states “N/A”.

 

  • The answer to this maybe if this question is answered: If you press update mass in the model iproperties and it give you a mass but when you then come out of iproperties and then go back into it why do you have to press the update mass again even if nothing as changed?

 

 

3:            Using the code below I can force the model iproperties mass to be read from the model directly to a custom iproperty in the drawing. The mass is updated using an event trigger when the drawing is opened.

 

doc = ThisDoc.Document

customPropertySet = doc.PropertySets.Item("Inventor User Defined Properties")

modeldocname = IO.Path.GetFileName(ThisDoc.ModelDocument.FullFileName)

mass = iProperties.Mass(modeldocname)

iProperties.Value("Custom", "Mass From Assembly") = Round(mass) & " kg"

InventorVb.DocumentUpdate()

 

Issue with this method: If the drawing is open and the user then opens and adds a part to the model but keeps the drawing open there is no trigger for the mass in the drawing to update.

 

 

In my mind method 2 is the way to go but there are so many drawing being printed off that states “N/A” for the mass that another method is needed.

 

Anyone any clues?

Valued Mentor
stephengibson76
Posts: 1,122
Registered: ‎08-01-2006
Message 2 of 8 (652 Views)

Re: Drawing mass update issue

11-20-2013 04:32 AM in reply to: gazadder

use option 2...

 

go to tools, application options, general tab, physical properties and tick update physical properties on save, and below tick parts and assemblies

Stephen Gibson



View stephen gibson's profile on LinkedIn


Valued Contributor
gazadder
Posts: 64
Registered: ‎05-11-2007
Message 3 of 8 (651 Views)

Re: Drawing mass update issue

11-20-2013 04:32 AM in reply to: gazadder
I have found that the Prompt: “Do you want to calculate the mass properties for the master level of detail?” set to “Yes” does make a difference however I have to have this set to “No” because although when parts are suppressed using Ilogic they are given “reference” in the BOM structure so their weight is not counted anyway even in Master but I need the model mass to work and update when someone manually adds parts in the Ilogic LOD. If ithe above is set to “Yes” then if someone manually suppresses a part in the Ilogic LOD then its mass is still counted which is not what I want.
Valued Contributor
gazadder
Posts: 64
Registered: ‎05-11-2007
Message 4 of 8 (650 Views)

Re: Drawing mass update issue

11-20-2013 04:36 AM in reply to: stephengibson76
Thanks Stephen but this seems to be already ticked.
Valued Mentor
stephengibson76
Posts: 1,122
Registered: ‎08-01-2006
Message 5 of 8 (630 Views)

Re: Drawing mass update issue

11-20-2013 06:13 AM in reply to: gazadder

so you save the assembly or part, go to the drawing and hit update and the mass still reads N/A?

Stephen Gibson



View stephen gibson's profile on LinkedIn


Valued Contributor
gazadder
Posts: 64
Registered: ‎05-11-2007
Message 6 of 8 (627 Views)

Re: Drawing mass update issue

11-20-2013 06:17 AM in reply to: stephengibson76
The drawing doesn't have the update button illuminated so cannot be pressed. However, there should not be a need for a model save for the mass in the drawing to update.
Product Support
bob.holland
Posts: 409
Registered: ‎02-15-2013
Message 7 of 8 (597 Views)

Re: Drawing mass update issue

11-20-2013 05:01 PM in reply to: gazadder

Can you tell us if this happens to all of your parts or just select parts?

 

Thank you.



Bob Holland


Valued Contributor
gazadder
Posts: 64
Registered: ‎05-11-2007
Message 8 of 8 (583 Views)

Re: Drawing mass update issue

11-21-2013 12:33 AM in reply to: bob.holland

It’s a little more complicated than this but I have found an instance where I get the problem 100% of the time as explained below:-

 

Basically I have 1 sub-assembly in my top assembly. Some of the sub-assembly parts have been supressed with an ilogic rule. Because some parts are suppressed then the sub-assembly and the top assembly each have a new level of detail which is what is used to work on. Now if I set the prompt “Do you wish to calculate the mass properties for the Master Level of Detail” is set to “No” then that’s when I start having problems. And first placement of the top assembly in a new drawing the mass will say "N/A" when I try to bring it through. By toggling the prompt “Do you wish to calculate the mass properties for the Master Level of Detail” to "yes" then back to "No" the mass is then read on the drawing.

Now the interesting part is if I then go back to the model and drag in a copy of the sub-assembly to the top assembly and then go back to the drawing the mass states "N/A" however if instead of dragging in the sub-assembly but rather a un-suppressed part only within the sub-assembly then the mass in the drawing updates as it should.

 

Just to note: With “Do you wish to calculate the mass properties for the Master Level of Detail” is set to “No” then Update Mass button in the Manage tab cannot be ghosted out if pressed. However if I go through Iproperties and update the mass then that works fine. Also at any point when the Update Mass button can't be pressed and the mass in the drawing states "N/A" I can read an updated mass with a message box in an ilogic rule. That is why I have previously used ilogic to bring through the mass to the drawing as it works 100% of the time but the only problem is it needs to be triggered by a user or an event which may not happen.

 

So why do I not have the prompt “Do you wish to calculate the mass properties for the Master Level of Detail” set to "Yes"? Well my models work as a template. The basic structure of the model is configured using Ilogic and parts are suppressed with ilogic automatically giving the suppressed parts a "reference" BOM structure and so their mass is not counted even in the Master level of detail. However, designers are permitted to add their own custom parts and can suppress or unsuppress them at free choice and if they do suppress them then they are not changing the parts BOM structure to "reference" so their suppressed parts mass would be included in the Master LOD giving an incorrect mass in the drawing.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.