| Revit 2017 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: 17.0.0.0 (17.0.484.0)
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. |