Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

When dealing with things like Mass, Volume, & Density, it is almost always best to go the API route, and access the MassProperties object.  Then, if you need to make sure the value is up to date, you may need to adjust the 'Accuracy' setting.  Adjusting the accuracy will force an update and recalculation before retrieving the new value at that accuracy level.  There was a thread about this somewhere here on this forum a couple\few years ago in which an Autodesk employee pointed this out.  And the one API sample VBA macro shows an example of this type of thing too, but goes into too much other detail for most folks.  However, values obtained through the API route will usually need to have the units converted from 'database units' (g/cm^3) to 'document units'.  The simplistic iLogic snippet iProperties.Mass will return the Mass value in document units directly, but the online documentation for that property does not say anything about causing an update.

Edit:  By the way, I know the MassProperties object does not have a direct property for Density, but getting that value is as simple as Mass/Volume, so it is fairly simple to obtain that way.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)