Template — Type-Level Rule
Use this template as a starting point for rules that validate data on FamilySymbol objects: Assembly Code, Type Mark, fire rating, and other type parameters.
Copy the template, then adapt the configuration section at the top. Do not change the structure unless you have a specific reason.
Template
(
/* ── Configuration ─────────────────────────────────────── */
$CategoryInclusion := ["OST_Doors", "OST_Windows"];
/* ── Scope: loadable, non-in-place, model families ─────── */
$familyIds := $[
type = "Family"
and values.isEditable = true
and values.isInPlace = false
].id;
/* ── Filter FamilySymbols ───────────────────────────────── */
$[
type = "FamilySymbol"
and parent.id in $familyIds
and values.category.type = "Model"
and values.category.label in $CategoryInclusion
].{
"id": id,
"type": type,
"name": name,
"assemblyCode": values.assemblyCode,
"typeMark": values.typeMark
}
)
What to adapt
| Part | What to change |
|---|---|
$CategoryInclusion |
The categories this rule applies to |
| Output fields | Replace or add fields from values.* that the validator needs |
What not to change
- The Family scope conditions (
isEditable,isInPlace) — these are correct defaults for loadable family rules - The
category.type = "Model"condition — always include this before a category label filter - The output structure (
id,type,name) — these are required by DAQS
Adding Assembly Code scoping
If the rule only applies to types with a specific Assembly Code or pattern:
/* Add to the FamilySymbol filter */
and $string(values.assemblyCode) ~> /^32\./
Or with an explicit list:
$AssemblyCodes := ["32.31", "32.32"];
/* Add to the FamilySymbol filter */
and values.assemblyCode in $AssemblyCodes
Adding a shared parameter to the output
/* At the top */
$paramKey := "p_8fe8f5ce-4979-4679-b5e0-ccfb362b9059";
/* In the output */
"fireRating": $exists($lookup(values, $paramKey))
? $lookup(values, $paramKey).value
: null
For more complex shared parameter access, use the helper pattern from Shared Parameter Access.