2020 Method
Changes 8
M

Units.SetFormatOptions

Description:
Sets the default FormatOptions for a unit type.
Remarks:
Some unit types have definitions which are automatically derived from other unit types. For example, UT_SheetLength is derived from UT_Length and UT_ForceScale is derived from UT_Force. In such cases, calling SetFormatOptions() for one unit type may have the side effect of changing the FormatOptions for other unit types that depend on it.
public void SetFormatOptions(
	UnitType unitType,
	FormatOptions options
)
  • unitType is an invalid unit type. See UnitUtils.IsValidUnitType() and UnitUtils.GetValidUnitTypes(). -or- FormatOptions cannot be modified for unitType. See Units.IsModifiableUnitType() and Units.GetModifiableUnitTypes(). -or- UseDefault is true in options. -or- The display unit in options is not a valid display unit for unitType. See UnitUtils.IsValidDisplayUnit(UnitType, DisplayUnitType) and UnitUtils.GetValidDisplayUnits(UnitType). -or- The rounding method in options is not set to Nearest.
  • A non-optional argument was NULL
  • A value passed for an enumeration argument is not a member of that enumeration