Sets the default FormatOptions for a unit type.
Namespace:
Autodesk.Revit.DB
Assembly:
RevitAPI
(in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since:
2014
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- unitType
-
Type:
Autodesk.Revit.DB
UnitType
The unit type.
- options
-
Type:
Autodesk.Revit.DB
FormatOptions
The ForrmatOptions.
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.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions ArgumentException | 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). |
Autodesk.Revit.Exceptions ArgumentNullException | A non-optional argument was NULL |
Autodesk.Revit.Exceptions ArgumentOutOfRangeException | A value passed for an enumeration argument is not a member of that enumeration |