Skip to content

Materials

Materials define the surface and structural properties assigned to geometry in a Revit model. In DAQS, Material objects appear in the flat array alongside all other types.


The Material object

{
  "id": 204812,
  "type": "Material",
  "name": "Beton_Gewapend_Constructief",
  "parent": null,
  "values": {
    "usedCount": 3
  }
}

Key fields:

Field Description
name Material name — the primary field for naming convention rules
values.usedCount Number of elements that reference this material in the model

Basic filter

$[type = "Material"].{
  "id": id,
  "type": type,
  "name": name,
  "usedCount": values.usedCount
}

Filtering by usage

A model often contains materials that were imported or created but never assigned. Most naming rules only apply to materials actually in use:

$[type = "Material" and values.usedCount > 0].{
  "id": id,
  "type": type,
  "name": name,
  "usedCount": values.usedCount
}

This pattern appears in every production material rule. Always add values.usedCount > 0 unless you explicitly want to audit unused materials.


Splitting a structured name

Material names are often structured with a separator such as _. To validate each part independently, split the name and expose the parts as output fields:

$[type = "Material" and values.usedCount > 0].(
  $parts := $split(name, "_");

  {
    "id": id,
    "name": name,
    "usedCount": values.usedCount,
    "part0": $parts[0],
    "part1": $exists($parts[1]) ? $parts[1] : "",
    "part2": $exists($parts[2]) ? $parts[2] : ""
  }
)

Each partN field can then be validated against a lookup table in the validator.


Common mistakes

  • Forgetting values.usedCount > 0 — unused materials create noise in validation results
  • Using $split(name, "_")[1] without $exists() — returns undefined when the name has fewer parts than expected