LengthFormat
How length measurements are formatted for display.
Controls the notation style used when showing lengths in dimensions, the tape measure, and the Value Control Box. Read the current format from UnitOptions.lengthFormat, or change it via UnitOptions.update.
Example
Section titled “Example”let model = await SketchUpApi.getActiveModel();let { LengthFormat } = SketchUpApi;let units = model.options.unitOptions;console.log(units.lengthFormat);// => 0 (Decimal)
// Switch to feet-and-inches notationawait units.update({ LengthFormat: LengthFormat.Architectural,});let updated = await units.refresh();console.log(updated.lengthFormat);// => 1 (Architectural)UnitOptions for reading and updating the active format
Enumeration Members
Section titled “Enumeration Members”Architectural
Section titled “Architectural”Architectural:
1
Feet and fractional inches, like 3' 6 1/2".
Decimal
Section titled “Decimal”Decimal:
0
Decimal notation, like 3.5" or 0.089 m.
Engineering
Section titled “Engineering”Engineering:
2
Feet and decimal inches, like 3' 6.5".
Fractional
Section titled “Fractional”Fractional:
3
Whole number with fractional remainder, like 3 1/2".