SetFormula Method


Family Manager Set Formula Method

Set the formula of a family parameter.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public void SetFormula(
	FamilyParameter familyParameter,
	string formula
)

Parameters

familyParameter FamilyParameter
The family parameter.
formula String
The formula string, input to clean the formula of the parameter.
Exceptions
Exception Condition
ArgumentNullException Thrown when the input argument-"familyParameter"-is .
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.
See Also
ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →