Revit 2018 API |
FamilyManager..::..SetFormula Method |
FamilyManager Class See Also |
Set the formula of a family parameter.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 18.0.0.0 (18.2.0.13)
Syntax
C# |
---|
public void SetFormula( FamilyParameter familyParameter, string formula ) |
Visual Basic |
---|
Public Sub SetFormula ( _ familyParameter As FamilyParameter, _ formula As String _ ) |
Visual C++ |
---|
public: void SetFormula( FamilyParameter^ familyParameter, String^ formula ) |
Parameters
- familyParameter
- Type: Autodesk.Revit.DB..::..FamilyParameter
The family parameter.
- formula
- Type: System..::..String
The formula string, input nullNothingnullptra null reference (Nothing in Visual Basic) to clean the formula of the parameter.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentNullException | Thrown when the input argument-"familyParameter"-is nullNothingnullptra null reference (Nothing in Visual Basic). |
Autodesk.Revit.Exceptions..::..InvalidOperationException | Thrown when there is no valid family type, or the parameter cannot be assigned a formula, or the operation make a circular chain of references among the formulas. |