GetRule Method


Gets the specified rule.

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

Syntax

C#
public RoutingPreferenceRule GetRule(
	RoutingPreferenceRuleGroupType groupType,
	int index
)
Visual Basic
Public Function GetRule ( _
	groupType As RoutingPreferenceRuleGroupType, _
	index As Integer _
) As RoutingPreferenceRule
Visual C++
public:
RoutingPreferenceRule^ GetRule(
	RoutingPreferenceRuleGroupType groupType, 
	int index
)

Parameters

groupType
Type: Autodesk.Revit.DB RoutingPreferenceRuleGroupType
The routing preference group type from which the rule should be returned.
index
Type: System Int32
The zero-based index where the rule should be returned.

Return Value

The rule at the specified group and zero-based index position.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException index is not a valid zero-based index within groupType. -or- Thrown if the index is out of bounds
Autodesk.Revit.Exceptions ArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration

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 →