The Autodesk.Revit.DB.SpecTypeId is a class that represents the unique identifier of a specification.
The following are the properties of the Autodesk.Revit.DB.SpecTypeId class:
The Autodesk.Revit.DB.SpecTypeId class does not have any methods.
The following code demonstrates how to retrieve the specification type for the length parameter:
// Get the length parameter
Parameter lengthParameter = someElement.get_Parameter(BuiltInParameter.LENGTH_PARAM);
// Get the specification type id for the length parameter
SpecTypeId lengthSpecTypeId = lengthParameter.Definition.UnitType;
// Do something with the length specification type id
In this example, we retrieve the length parameter for some element and then use its Definition.UnitType property to get the corresponding specification type id.