Doesnt always update Mass on drawing

Doesnt always update Mass on drawing

Anonymous
Not applicable
5,663 Views
17 Replies
Message 1 of 18

Doesnt always update Mass on drawing

Anonymous
Not applicable

Inventor 2015 Professional.

We have a re occurring issue in that the Drawing doesn't always display the Mass. Our current work around is to open the model, open iproperties the mass is already populated and without doing anything close the iproperties within the model and close it. The mass then updates on the drawing.

 

Within Inventor application options, we have enabled the Update physical properties on save for parts and assemblies.

We have spoken with our Autodesk re seller who we have a support contract with and they agreed the properties on the drawing is correct.

 

Is there a illogic code that we can use to refresh the iproperties on save.

Open to any other suggestions.

 

Regards,

Carl

0 Likes
5,664 Views
17 Replies
Replies (17)
Message 2 of 18

ThomasB44
Mentor
Mentor

Hi @Anonymous

I 'm not sure if you're talking about the mass property in drawing environment, which sometimes is displaying "N/A" in the title block ?

 

If not, try this code, I think it should do the job anyway.

 

SyntaxEditor Code Snippet

'For several parts in drawing environment
'update mass to avoid the "N/A" in title block
Dim oApp As Application: oApp = ThisApplication
Dim oDoc As DrawingDocument:  oDoc = oApp.ActiveDocument
Dim oSheets As Sheets
Dim oSheet As Sheet
Dim oViews As DrawingViews
Dim oView As DrawingView
oSheets = oDoc.Sheets
For Each oSheet In oSheets
    oViews = oSheet.DrawingViews
    For Each oView In oViews
        modelName =  oView.ReferencedDocumentDescriptor.ReferencedDocument.DisplayName
        iProperties.Mass(modelName) = 1 'override automatic calculation
        iProperties.Mass(modelName) = -1 'set it back to automatic calculation
        mass = iProperties.Mass(modelName) 'force to read the property
    Next
Next
InventorVb.DocumentUpdate() 'update drawing

 


Thomas
Mechanical Designer / Inventor Professional 2025
Inventor Professional EESignature

Message 3 of 18

Anonymous
Not applicable

Hi Thomas, you are right. When the mass doesn't update it displays N/A on the drawing using the mass property field.

However by opening and closing the iproperties this refreshes the mass, without the need to update the mass in the iproperties as this is already displayed. When you reopen the drawing the mass is then displayed.

 

Regards,

Carl

0 Likes
Message 4 of 18

ThomasB44
Mentor
Mentor

In my 2014 version, I MUST click on the update button in the iProperties window to refresh the mass.

Perhaps it is not the case in your 2015 version ?

 

Did you try the rule I gave ?

This should do the trick and work with multiple sheets and parts.

 


Thomas
Mechanical Designer / Inventor Professional 2025
Inventor Professional EESignature

0 Likes
Message 5 of 18

blandb
Mentor
Mentor

Have you tried in Tools Tab > Application Options > Physical Properties Section > checking the "Update physical properties on save" and use Parts and assemblies radio button?

Autodesk Certified Professional
0 Likes
Message 6 of 18

ThomasB44
Mentor
Mentor

You're right blandb, this option and the save command should update the mass property.

But sometimes you don't want to switch again and again between drawing, parts, and/or assemblies.

So a rule in the drawing environment is an other simply way.


Thomas
Mechanical Designer / Inventor Professional 2025
Inventor Professional EESignature

0 Likes
Message 7 of 18

SER4
Collaborator
Collaborator

Don't know if this helps anyone, but I had a similar problem with Configuration Factories/Members.

I had to manually run a custom property mass rule in a member in order for the drawing titleblock mass to update correctly.  (Notice you cannot add Event Triggers to members)...Or maybe I just need to regenerate the members again from the factory with the rule in it now.

Looks like my drawing Base View was based off the configuration member (which might have been a poor choice by us--probably should be the factory).

P.Eng. Mechanical Engineer
Dell Precision 5680 Laptop; Win11 Pro; 64GB RAM; i9-13900H CPU; Intel Iris Xe Graphics, NVIDIA RTX 3500 Ada Laptop GPU.
Vault Pro 2025.1 (30.1.63.0); Inventor Pro 2025.1.1 (241).
0 Likes
Message 8 of 18

johnsonshiue
Community Manager
Community Manager

Hi! Another option is to always keep mass up-to-date. Go to Tools -> App Options -> General -> Physical properties -> check "Update physical properties on save." The parts and assemblies will always have updated mass prop.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 9 of 18

emanuel.c
Collaborator
Collaborator

Unfortunately, Tools -> App Options -> General -> Physical properties -> check "Update physical properties on save - Parts and Assemblies" does NOT update Mass in Drawing Environment in the Title Block.This at least applies to Assemblies. I'm not sure about individual parts, but I don't remember having issues with individual part mass updating. I always got N/A instead, even if just a part name changed, no physical property. I had to go to iproperty and refresh mass that way. It was so frustrating that I added an "Update Mass" shortcut on the Ribbon.

 

Recently I realized that mass can update upon saving the file and so all I do is open the assembly and save it and mass in Title Block is then updated also. Go to Application Options -> Save -> Mass property update -> Select "Save"

 

I haven't tried the iLogic, but I do wish this process was automatic and "Update physical properties on save" would work well for assemblies also!

Message 10 of 18

johnsonshiue
Community Manager
Community Manager

Hi Emanuel,

 

Indeed, the two sets of options may fight each other. If the file save option is not turned on, it will not be saved regardless.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 11 of 18

Clo-z-nuff_2
Enthusiast
Enthusiast

We are using Inv Pro 2018.

 

I have tried running the code above and get this error;  "Object reference not set to an instance of an object." at the line:

iProperties.Mass (modelName) = 1 'override automatic calculation

Can someone explain what this error means?  I am not a programmer and a beginner at iLogic.

 

Thanks!

0 Likes
Message 12 of 18

mark_francis
Participant
Participant

Having to constantly update the mass manually on drawings is very annoying - switch back to the part, change to the Manage tab, click on Update Mass, change back to the drawing tab. And then I often forget to do it when exporting to PDF, so have to go back and do it all again. Very poor workflow.

 

Even worse with Part Factory parts - it's not enough to update the mass in the part factory, I need to manually open the derived part and update the mass there - even more steps to the workflow.

 

Having an option to auto update would increase productivity tremendously - really, it's something we shouldn't even have to think about. 

 

Writing iLogic scripts is great for specific use cases, but this is such a basic function, I would like to see it as a standard feature.

0 Likes
Message 13 of 18

johnsonshiue
Community Manager
Community Manager

Hi Mark,

 

Did you try turning on the option mentioned above (Tools -> App Options -> General -> Update physical properties on save -> select Part and Assembly)?

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 14 of 18

mark_francis
Participant
Participant

Hi Johnson,

 

Thanks for your reply. Yes of course, I have this option enabled. But even this feature does not work.

 

For example, in my part & assembly templates, I have a general annotation that displays the mass in the lower right hand corner of the window.

 

Every time I made a change, this annotation displays N/A. If I save the part/assembly, the annotation still displays N/A - it does not update on save!! Only when I "Update Mass" does the annotation display the mass.

 

At least with parts & assemblies I can have the "Update Mass" command on a floading custom user ribbon palette, so it's only one click away. This is not possible with drawings, as the "Update Mass" command is disabled, so we are forced to go back to the part/assembly, manually update the mass, and then return to the drawing. 

 

I would love to see a global option to "Always update mass". As a comparison, surely updating the mass is less computationaly expensive than calculating the constraints in an assembly for example, and this is something that has a global option (Application Options/Assembly/Defer Update).

 

Perhaps I need to add an enhancement request to Inventor Ideas 🙂

 

 

Regards,

Mark

 

2023-07-31 08 09 30.png

 

2023-07-31 08 18 19.png

 

 

0 Likes
Message 15 of 18

emanuel.c
Collaborator
Collaborator

Yes sometimes, even just re-opening the drawing would show N/A for Mass. Right click and update would sometimes work but sometimes I had to open the assembly and re-save it for Mass to update, even though nothing had changed since it was previously opened.

 

What you're asking for makes perfect sense. I gave up on it and since I run some iLogic code on all parts / assemblies anyway I added code to create an iProperty which stores the Mass value. I then use this iProperty wherever Mass would be used throughout drawings. Yes it needs to be updated if assemblies / parts change (because it's a static value) but I have to re-run the code anyway. This way I never get the N/A anymore. Do you need assistance with using some iLogic?

 

Message 16 of 18

mslosar
Advisor
Advisor

We wound up going the same route years ago.

 

Small ilogic routine that publishes the weight to a parameter and drawings refer to that and stick it in the triggers under 'before save'. Never had the N/A problem on a drawing since.

Message 17 of 18

johnsonshiue
Community Manager
Community Manager

Hi! The behavior captured in the images does not look right to me. If possible, please share the files with me directly johnson.shiue@autodesk.com. I would like to understand the behavior better.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 18 of 18

mark_francis
Participant
Participant
Hi Johnson, thanks for the followup. Somewhat sheepishly, I must admit that I did not have the " Update physical properties on save" setting enabled (I think I disabled it in an attempt to stop Vault asking me to check out every single file opened).

So, yes, the mass updates on save, but when working on drawings it still requires switching to the part and saving, which is much the same as clicking "Update Mass".

Emanuel & mslosar, thanks for your comments. Sounds like iLogic is the way to go for this problem - if I get stuck I'll reach out for some help!

Mark