Add a formula-driven parameter to the shape definition.
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.2.0.0 (26.2.0.0)
Syntax
C#
public void AddFormulaParameter( ElementId paramId, string formula )
Parameters
- paramId ElementId
- The parameter. To obtain the id of a shared parameter, call RebarShapeParameters.GetElementIdForExternalDefinition.
- formula String
- The formula expressed as a string. The string is exactly what a user would type into the Family Types dialog, e.g. "Total Length*3.14159*(Bar Diameter/2)*(Bar Diameter/2)"
Exceptions
Exception | Condition |
---|---|
ArgumentException | paramId is not the id of a shared parameter in the current document, or its unit type is not Reinforcement_Length, Angle or Number. -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 |