C# Class Revit.SDK.Samples.ImportExport.CS.Unit

Provides static functions to convert unit
Mostrar archivo Open project: AMEE/revit

Public Methods

Method Description
CovertFromAPI ( DisplayUnitType to, double value ) : double

Convert the value get from RevitAPI to the value indicated by DisplayUnitType

CovertToAPI ( double value, DisplayUnitType from ) : double

Convert a value indicated by DisplayUnitType to the value used by RevitAPI

Private Methods

Method Description
ImperialDutRatio ( DisplayUnitType dut ) : double

Get ratio between value in RevitAPI and value to display indicated by DisplayUnitType

Method Details

CovertFromAPI() public static method

Convert the value get from RevitAPI to the value indicated by DisplayUnitType
public static CovertFromAPI ( DisplayUnitType to, double value ) : double
to DisplayUnitType DisplayUnitType indicates unit of target value
value double value get from RevitAPI
return double

CovertToAPI() public static method

Convert a value indicated by DisplayUnitType to the value used by RevitAPI
public static CovertToAPI ( double value, DisplayUnitType from ) : double
value double Value to be converted
from DisplayUnitType DisplayUnitType indicates the unit of the value to be converted
return double