CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
Over 1.095.000 registered users (EN+CZ). AutoCAD tips, Inventor tips, Revit tips. Try the new precise Engineering calculator. New AutoCAD 2026 commands and variables.

CAD tip CAD tip # 9952:

Question

CAD 
 %  platform  category 
A
iProperties in Inventor documents allow to manually override values of Mass and Volume. These values are also used for the automatic iProperty "Density".

Overrides of true values can be useful in many cases (purchased parts, dummy parts in assemblies), but they can also be source of problems if you e.g. forget to update or replace the overridden value.

With the following simple macro you can quickly check if the iProperties "mass" and "volume" are manually overridden in the current document (IPT part):


oPartDoc = ThisApplication.ActiveDocument  
oMassProps = oPartDoc.ComponentDefinition.MassProperties  
uom = oPartDoc.ComponentDefinition.Document.UnitsOfMeasure  
'InventorVb.DocumentUpdate()  
  
voverridden = oMassProps.VolumeOverridden  
moverridden = oMassProps.MassOverridden  
voLunits = uom.GetStringFromType(uom.LengthUnits) & "^3"  
 
MsgBox ("MassOverridden=" & moverridden & vbTab & " [" & uom.GetStringFromValue(oMassProps.Mass,uom.MassUnits) & "]" &  
vbCrLf &  
"VolumeOverridden=" & voverridden & vbTab & " [" & uom.GetStringFromValue(oMassProps.Volume, volunits) & "]" , _  
MessageBoxIcon.Information, _  
"iProp Overrides")  
 


Example:

Output from the macro:

Inventor
100% *CAD
13.8.2014    13544×  
applies to: Inventor ·

See also:
Tip 14611:Contribution of individual features to the total mass of an Inventor part (iLogic).
Tip 14200:How can I use multiple title blocks in an Inventor drawing?
Tip 13884:How to send e-mails with an iLogic macro?
Tip 13611:BOM with multi-line items in Inventor.
Tip 13536:iLogic: How to find if a document is a sheet metal part and if it contains holes?


Back    All CAD Tips



Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD: 
OS: 
Categ: 
Text:
 FAQ
  



Featuring:
Increase your productivity with our set of add-on functions for AutoCAD Civil 3D
CADstudio Civil Tools More info


Please use these tips at your own risk.
ARKANCE is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist