RemoveRule Method


Removes an existing routing preference rule. Thrown if the index is out of bounds.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2013

Syntax

C#
public void RemoveRule(
	RoutingPreferenceRuleGroupType groupType,
	int index
)
Visual Basic
Public Sub RemoveRule ( _
	groupType As RoutingPreferenceRuleGroupType, _
	index As Integer _
)
Visual C++
public:
void RemoveRule(
	RoutingPreferenceRuleGroupType groupType, 
	int index
)

Parameters

groupType
Type: Autodesk.Revit.DBRoutingPreferenceRuleGroupType
The routing preference group type in which the rule should be removed.
index
Type: SystemInt32
The index position of removed routing preference rule in the group.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException index is not a valid zero-based index within groupType. -or-
Autodesk.Revit.ExceptionsArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration
Autodesk.Revit.ExceptionsDisabledDisciplineException None of the following disciplines is enabled: Mechanical Electrical Piping.

See Also