IsValidFormula Method


Tests that the given expression is a valid as formula for this parameter.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2016 Subscription Update

Syntax

C#
public bool IsValidFormula(
	string expression
)
Visual Basic
Public Function IsValidFormula ( _
	expression As String _
) As Boolean
Visual C++
public:
bool IsValidFormula(
	String^ expression
)

Parameters

expression
Type: System String

Remarks

Use this method to test validity of a formula before assigning it to a global parameter when in doubt whether it is an acceptable expression or not.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null

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 →