Adds a new routing preference rule to the specified position in the rule group.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2013
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- groupType
- Type: Autodesk.Revit.DB RoutingPreferenceRuleGroupType
The routing preference group type in which the rule should be added.
- rule
- Type: Autodesk.Revit.DB RoutingPreferenceRule
The new rule to be added.
- index
- Type: System Int32
The zero-based index position where the new rule will be added.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions ArgumentException | index is not a valid zero-based index within groupType. -or- The rule cannot be added to the groupType. -or- Thrown if the index is out of bounds, or the rule is not valid for this group (e.g. an elbow may not be added to the junction group). |
Autodesk.Revit.Exceptions ArgumentNullException | A non-optional argument was null |
Autodesk.Revit.Exceptions ArgumentOutOfRangeException | A value passed for an enumeration argument is not a member of that enumeration |
Autodesk.Revit.Exceptions DisabledDisciplineException | None of the following disciplines is enabled: Mechanical Electrical Piping. |