CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 10621

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.

Inventor2012
100% *  CAD 
18.10.2011    16207×  
Prices - CAD eShop:
applies to: Inventor 2012 ·

See also:
Tip 13938:ModDXF - utility for bulk modification/display of internal DXF properties in DWG entities.
Tip 12881:How to attach multiple raster images to my DWG in one go?
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?


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 glossary   



Featuring:
Increase your productivity with our set of BIM add-on functions for Autodesk Revit
CADstudio Revit Tools More info


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