Over 1.091.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 # 8271:
Question
A
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.
Inventor2012


18.10.2011
17987×
applies to: Inventor 2012 ·