SetRuleEnabled Method (PerformanceAdviserRuleId, Boolean)


Retrieves an enabled/disabled status for the given rule.

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

Syntax

C#
public void SetRuleEnabled(
	PerformanceAdviserRuleId id,
	bool enabled
)
Visual Basic
Public Sub SetRuleEnabled ( _
	id As PerformanceAdviserRuleId, _
	enabled As Boolean _
)
Visual C++
public:
void SetRuleEnabled(
	PerformanceAdviserRuleId^ id, 
	bool enabled
)

Parameters

id
Type: Autodesk.Revit.DB PerformanceAdviserRuleId
The rule id to set enabled/disabled status for.
enabled
Type: System Boolean
True enables the rule, false disables.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException The id does not correspond to any registered rule.
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 →