2027 Method
Changes 5
M

UnitUtils.ConvertToInternalUnits

Description:
Converts a value from a given unit to Revit's internal units.
public static double ConvertToInternalUnits(
	double value,
	ForgeTypeId unitTypeId
)
  • Double
    value
    The value to convert.
  • unitTypeId
    Identifier of the unit quantifying the value.
Return Value Double The converted value.
  • The given value for value is not finite -or- unitTypeId is not a unit identifier. See UnitUtils.IsUnit(ForgeTypeId) and UnitUtils.GetUnitTypeId(DisplayUnitType).
  • A non-optional argument was null