GetParameter Method


Retrieves a parameter from the element given identifier.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2022

Syntax

C#
public Parameter GetParameter(
	ForgeTypeId parameterTypeId
)
Visual Basic
Public Function GetParameter ( _
	parameterTypeId As ForgeTypeId _
) As Parameter
Visual C++
public:
Parameter^ GetParameter(
	ForgeTypeId^ parameterTypeId
)

Parameters

parameterTypeId
Type: Autodesk.Revit.DB ForgeTypeId
Identifier of the built-in parameter.

Remarks

Parameters are a generic form of data storage within elements. The parameters are visible through the Autodesk Revit user interface in the Element Properties dialog. This method uses a built in parameter identifier to access the parameter. Autodesk Revit has a large number of built in parameters that are available via static properties.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException parameterTypeId does not identify a built-in parameter. See Parameter.IsBuiltInParameter(ForgeTypeId) and Parameter.GetParameterTypeId(BuiltInParameter).
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL

See Also