CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products []
Cesky English Deutsch
 Visitors: 5776 

CAD tip CAD tip # 9952:

Question CAD 
 %  platform  category 
Q - question

iLogic rule - check whether iProperties are overridden.

A - answer 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  
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")  


Output from the macro:

100% *  CAD 
13.8.2014    4409×  
Comments   Tell a friend
applies to: Inventor ·

See also:
Tip 10852:iLogic - how to get part material and path from a drawing?
Tip 9659:iLogic: adjusting model parameters to match model volume or mass
Tip 9477:Saving a DWG copy of an IDW drawing named by revision number.
Tip 9340:Using iLogic to parse IPT filename and populate iProperties.
Tip 8986:Material density as a custom iProperty in Inventor.

Back   All CAD Tips All CAD tips&tricks

Selecting hatch borders performs zoom out. « | » One layout view doesn't display border, cannot be selected.

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 glossary   

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.
CAD Studio (Xanadu) is not responsible for possible problems that may occur as a result of using any of these tips.