ConvertToInternalLength

double ConvertToInternalLength(this Document doc, double displayValue)

Converts a length from the document's display units to internal database units (feet).

Parameters

  • docDocument

    The Revit document instance.

  • displayValuedouble

    The length value in the document's display units.

Returns: The converted length value in internal units (feet).

Example

double displayLength = 3000; // e.g., mm
double internalLength = doc.ConvertToInternalLength(displayLength);