Skip to content

Narrowing the filter — filtering by category

So far, we selected all FamilySymbol objects.

In practice, most rules apply to a specific Revit category, not to everything.

This filter shows how to limit a rule to door types only.

(
  $[type = "FamilySymbol" and values.category.label = "OST_Doors"].{
    "id": id,
    "type": type,
    "name": name,
    "assemblyCode": values.assemblyCode
  }
)

What is new in this filter

The key addition is this condition:

values.category.label = "OST_Doors"

This restricts the filter to FamilySymbols whose category is Doors.


Revit category terminology (important)

OST_Doors is Revit API category naming.

In the Revit user interface, users see:

  • Doors

In the Revit API (and therefore in DAQS Assist), this is:

  • OST_Doors

DAQS always uses API category identifiers, not UI labels.


Where category data lives

For FamilySymbol, category information lives here:

"values": {
  "category": {
    "id": -2000023,
    "label": "OST_Doors",
    "name": "Doors",
    "type": "Model",
    "materialId": null
  }
}

Key fields:

  • label → Revit API identifier (use this in rules)
  • name → Human-readable name
  • type → Model / Annotation

Why we use label, not name

Use:

values.category.label = "OST_Doors"

Not:

values.category.name = "Doors"

Reason:

  • label is stable
  • name can be:

  • Localised

  • Renamed
  • Different per language

Rules should never depend on UI language.


Combined filter logic (AND)

This part:

type = "FamilySymbol" and values.category.label = "OST_Doors"

Means:

“Select only FamilySymbols that are doors.”

Both conditions must be true.

This is how you:

  • Reduce noise
  • Improve performance
  • Make rule intent explicit

What the filter output represents

Each result represents:

One door type in the model, with its Assembly Code.

Example output:

{
  "id": 617464,
  "type": "FamilySymbol",
  "name": "1018x2387 – kader 40mm HPL",
  "assemblyCode": "32.31"
}

If the model contains:

  • 12 doors of this type You still get one result, because this is a type-level rule.

Common mistakes to avoid

Using the UI name instead of the API label

values.category.name = "Doors"

❌ Fragile — breaks in non-English Revit versions.


Filtering category on the wrong object type

$[type = "Family" and values.category.label = "OST_Doors"]

❌ Families do not carry category information in a reliable way.


Over-filtering too early

$[type = "FamilySymbol" and values.category.label = "OST_Doors" and values.assemblyCode != null]

❌ Missing data is silently excluded instead of reported.


Rule of thumb

Filter by category only after you know where category data lives, and only using stable API identifiers.