UnitsSetFormatOptions Method |
Sets the default FormatOptions for a spec.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic void SetFormatOptions(
ForgeTypeId specTypeId,
FormatOptions options
)
Public Sub SetFormatOptions (
specTypeId As ForgeTypeId,
options As FormatOptions
)
public:
void SetFormatOptions(
ForgeTypeId^ specTypeId,
FormatOptions^ options
)
member SetFormatOptions :
specTypeId : ForgeTypeId *
options : FormatOptions -> unit
Parameters
- specTypeId ForgeTypeId
-
Identifier of the spec.
- options FormatOptions
-
The FormatOptions.
ExceptionsException | Condition |
---|
ArgumentException |
specTypeId is not a measurable spec identifier. See UnitUtils.IsMeasurableSpec(ForgeTypeId).
-or-
FormatOptions cannot be modified for specTypeId. See Units.IsModifiableSpec(ForgeTypeId) and Units.GetModifiableSpecs().
-or-
UseDefault is true in options.
-or-
The unit in options is not valid for specTypeId. See UnitUtils.IsValidUnit(ForgeTypeId, ForgeTypeId) and UnitUtils.GetValidUnits(ForgeTypeId).
-or-
The rounding method in options is not set to Nearest.
|
ArgumentNullException |
A non-optional argument was null
|
See Also