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: 4700
Plex.Earth connects AutoCAD and Google Earth

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
Revit
100% *  CAD 
7.1.2011    5767×  
Prices - CAD eShop:
applies to: Revit ·

See also:
Tip 12777:Arithmetic and trigonometric functions available in Revit expressions.
Tip 12624:How to enter dimensions in Revit using other units?
Tip 12609:Dynamo - how to convert a raster photo to 3D model in Revit?
Tip 11494:Entering decimal values using fractions in CAD applications.
Tip 10192:Wrong results when adding or subtracting °C temperatures in Revit.


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:
Save your floating licenses (NLS) consumed by inactive users - free unused licenses with
LogOff 2006 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.
TOPlist