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

CAD tip CAD tip # 7714:

Question CAD 
 %  platform  category 
Q - question

Magic number for Revit (metric).

A - answer If you program a macro or an add-on module for Revit, using either the integrated VSTA environment, or on of the Visual Studio .Net programming languages, sooner or later you will need a "magic" constant to multiply the size units.

Revit uses feet as internal units in its BIM database. You don't neccessarily see these units in the Revit UI as a user (if you use the metric settings) but you definitely need them as a programmer - and convert the internal values in some API functions. For these conversions you may need two constants:

Const MeterToFeet As Double = 3.2808399
Const FeetToMeter As Double = 0.3048
or - in millimeters:
Const MmToFeet As Double = 0.0032808399
Const FeetToMm As Double = 304.8
100% *  CAD 
7.1.2011    4880×  
Comments   Tell a friend
applies to: Revit ·

See also:
Tip 11494:Entering decimal values using fractions in CAD applications.
Tip 10192:Wrong results when adding or subtracting °C temperatures in Revit.
Tip 8887:Strange Revit message "Square feet per foot".
Tip 8253:Nudging AutoCAD and Revit objects with cursor keys.
Tip 8024:How to convert 3D models from SketchUp to AutoCAD?

Back   All CAD Tips All CAD tips&tricks

AutoCAD no longer displays the Command: prompt. « | » Loading EPlan projects into AutoCAD ecscad.

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   

Link your AutoCAD texts with Excel tables/sheets. Export. Change. Import.
Try DwgText 2015 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.