RevitAPI: How to get the available parameters used in ScheduleFilter for a specific category?

中文链接

By Aaron Lu

In Revit we can create schedule with schedule filter so that only the elements passed the filter will be shown in the schedule. e.g. I can let the schedule only show the elements on “level 1”.

S1 S2

From the above screenshots, we can see that the parameters available for filtering varies with the category we choose, so is there any way to get all the parameters that can be filterable for a specific category?

The answer is Yes, we can make use of TableView.GetAvailableParameters method, which is mainly used to get the parameters can be schedulable for specific category, as long as the parameter (built-in parameter) is schedulable, it can be filtered. So the example can be:

var availableParameterIds = TableView.GetAvailableParameters
(RevitDoc, new ElementId(BuiltInCategory.OST_DuctTerminal));
foreach (var pid in availableParameterIds)
{
var builtinParameter = (BuiltInParameter)pid.IntegerValue;
//work with the BuiltInParameter
}

 


Comments

3 responses to “RevitAPI: How to get the available parameters used in ScheduleFilter for a specific category?”

  1. This seems like a valuable procedure. New to programming the API and need a little help to better understand how to implement this.
    Scott Cooper

  2. Aaron,
    interesting post, do you know how I can get this code to python as a node in Dynamo. Would do much to help me deal with these Schedules.

  3. Steeloncall Avatar
    Steeloncall

    Steeloncall provide safe and secure delivery of product whenever you ask, wherever you ask.
    https://steeloncall.com/ms-angles
    https://steeloncall.com/construction-ms-rounds
    https://steeloncall.com/binding-wire

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading