Add a parameter to the shape definition.
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
C#
public void AddParameter( ElementId paramId, double defaultValue )
Parameters
- paramId ElementId
- The parameter. To obtain the id of a shared parameter, call RebarShapeParameters.GetElementIdForExternalDefinition.
- defaultValue Double
- A default value for this parameter in shapes. The default values should be chosen carefully, because they are required to be consistent as a set of constraints.
Exceptions
Exception | Condition |
---|---|
ArgumentException | paramId is not the id of a shared parameter in the current document, or its unit type is not UT_Reinforcement_Length or UT_Angle. -or- The name of a shared parameter identified by paramId was already used by another shared parameter of the element. |
ArgumentNullException | A non-optional argument was null |