SetSpec Method


Sets the spec describing the field's values.

Namespace: Autodesk.Revit.DB.ExtensibleStorage
Assembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2012

Syntax

C#
public FieldBuilder SetSpec(
	ForgeTypeId specTypeId
)
Visual Basic
Public Function SetSpec ( _
	specTypeId As ForgeTypeId _
) As FieldBuilder
Visual C++
public:
FieldBuilder^ SetSpec(
	ForgeTypeId^ specTypeId
)

Parameters

specTypeId
Type: Autodesk.Revit.DB ForgeTypeId
Identifier of the spec.

Return Value

The FieldBuilder object may be used to add more details to the field.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions InvalidOperationException The SchemaBuilder has already finished building the Schema. -or- The field type does not utilize unit conversions.

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →