SetFormatOptions Method (ForgeTypeId, FormatOptions)


Sets the default FormatOptions for a spec.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2014

Syntax

C#
public void SetFormatOptions(
	ForgeTypeId specTypeId,
	FormatOptions options
)
Visual Basic
Public Sub SetFormatOptions ( _
	specTypeId As ForgeTypeId, _
	options As FormatOptions _
)
Visual C++
public:
void SetFormatOptions(
	ForgeTypeId^ specTypeId, 
	FormatOptions^ options
)

Parameters

specTypeId
Type: Autodesk.Revit.DBForgeTypeId
Identifier of the spec.
options
Type: Autodesk.Revit.DBFormatOptions
The FormatOptions.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException 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.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →