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

CAD tip CAD tip # 8271:

Question CAD 
 %  platform  category 
Q - question

Always print Inventor drawings with updated Mass values.

A - answer Autodesk Inventor assembly drawings often contains references to iProperties and physical properties of the model (parts). But the "mass" property may be not always updated and the printed drawing may contain inaccurate assembly mass information.

The following VBA macro ensures that printing is invoked after the mass properties are updated:

Sub PrintWithUpdateMass() 'Update mass in all referenced documents Dim drw As DrawingDocument Set drw = ThisApplication.ActiveDocument Dim doc As Document Dim mass As Double For Each doc In drw.AllReferencedDocuments mass = doc.ComponentDefinition.MassProperties.mass Next Call drw.Update 'Invoke print or other command Call ThisApplication.CommandManager.ControlDefinitions("AppFilePrintCmd").Execute End Sub

No error checking included for simplicity

You can assign this macro to a new "Print" icon on your ribbon - see the Tip 8267.

100% *  CAD 
18.10.2011    9020×  
applies to: Inventor 2012 ·

See also:
Tip 12815:How to fill iProperties into Inventor files from Excel?
Tip 12627:How to override weight of an assembly component in Fusion 360?
Tip 11320:How to find volume, mass or surface area of a component in Fusion 360?
Tip 11189:Mass rename of spaces (Revit MEP) from rooms in an underlaid architecture model.
Tip 11034:Mass property depending on the current LOD in an Inventor assembly.

Back   All CAD Tips All CAD tips&tricks

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