GetRuleParameter Method


Returns the parameter for a given filter rule.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 19.0.0.0 (19.0.0.405)
Since: 2011

Syntax

C#
[ObsoleteAttribute("This method is deprecated in Revit 2019 and will be removed in the next version of Revit. We suggest that you use FilterRule.GetRuleParameter instead.")]
public static ElementId GetRuleParameter(
	FilterRule rule
)
Visual Basic
<ObsoleteAttribute("This method is deprecated in Revit 2019 and will be removed in the next version of Revit. We suggest that you use FilterRule.GetRuleParameter instead.")> _
Public Shared Function GetRuleParameter ( _
	rule As FilterRule _
) As ElementId
Visual C++
[ObsoleteAttribute(L"This method is deprecated in Revit 2019 and will be removed in the next version of Revit. We suggest that you use FilterRule.GetRuleParameter instead.")]
public:
static ElementId^ GetRuleParameter(
	FilterRule^ rule
)

Parameters

rule
Type: Autodesk.Revit.DB FilterRule
The rule to query.

Return Value

The identifier of the rule's parameter.

Remarks

If the given rule is a FilterInverseRule, then getRuleParameter will return the parameter of its inner rule.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException The given rule is not parameter-based.
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 →