CAD-QA Index — Configure (Target • ECSQL • RAG)

The Configure (Target • ECSQL • RAG) tab gives Information Managers and CAD Leads complete, transparent control over authority standards, regular expressions, coordinate grid bounds, RAG gate weights, approved Amber variations, and custom ECSQL rules—without writing application code.


Forking Custom Authority Configurations vs. Editing Presets

The toolbar at the top of the Configure tab provides four configuration lifecycle actions:

Authority Metadata & RAG Gate Weights

Below the toolbar, you can tune the global configuration metadata and default severity multipliers:


The 12 Canonical BIS Target Dimension Templates

When adding or editing a rule (Pillar 1), you can select from 12 Target BIS Dimensions and click Load Template to populate a ready-to-run parameterized ECSQL query and default parameters:

Target Key BIS Classes Queried Typical CAD Standard Use Case
repository_link bis.RepositoryLink CAD file extensions (.dgn, .dwg) and 7-field ISO 19650-2 / BS 1192 / NR/L3/INI/P3M/131/02 file naming regex checks.
model_structure bis.GeometricModel3d, bis.GeometricElement3d, bis.Sheet Enforcing 1 Design Model per Model File (-MOD-), 1 Sheet Model per Drawing File (-DRG-), and preventing live 3D graphics in Drawing Files.
spatial_category bis.GeometricElement3d → bis.SpatialCategory / bis.Category Auditing 3D level/layer names against Network Rail CP0091 4-attribute naming (<Disp>-<Group>-<Desc>-<Status>) or BS 1192 / Uniclass 2015 layers.
drawing_category bis.GeometricElement3d → bis.Category Detecting unpurged elements left on forbidden default layers (Default, 0, Level 0, Defpoints, Temp).
discipline_homogeneity bis.GeometricElement3d → bis.Category Special discipline_homogeneity evaluator verifying that all non-exempt (ZZ) levels in a single CAD model share one originating discipline code.
spatial_coordinates bis.GeometricElement3d (Origin, BBoxLow, BBoxHigh) Validating 1:1 scale element spans, project Easting/Northing grid bounds (SnakeGrid / OSGB36), and 3D Z-elevation datums (Z = 0 checks).
subcategory_symbology bis.Category → bis.SubCategory (Appearance) Flagging restricted CAD colours on non-construction levels (such as pure Yellow 65535 / RGB 255,255,0 that fails to plot legibly on PDF/hard copy).
sheet_border_and_tags bis.Sheet / bis.GeometricElement3d Checking ISO A0–A4 sheet dimensions, landscape orientation, standard drawing scale denominators, and placeholder labels (TBD, XXXX, ?).
annotation_placement bis.GeometricElement3d → bis.Category Flagging dimension levels (DIM, DIMENSION) placed inside 3D Design space rather than Sheet models.
cell_usage bis.GeometricElement3d Flagging restricted shared cell identifiers (SharedCell) where CAD standards mandate normal library cells.
construction_geometry bis.GeometricElement3d → bis.Category Detecting elements left on CONSTRUCT / construction levels prior to deliverable submission.
custom_ecsql Any BIS / Dynamic Schema Class Full user-authored parameterized ECSQL rule projecting the standard 4-column CAD-QA contract.

Customizing Parameters & Authoring Parameterized ECSQL (Pillar 2)

Inside the Edit Rule dialog:

  1. Pillar 2A — Rule Parameters ({paramName}): Every parameter token declared on a rule renders as a dedicated monospace input field (for example, levelRegex, modelRegex, minEasting, maxEasting, allowedScaleDenominators). Updating a parameter substitutes {paramName} automatically without requiring manual SQL edits.
  2. Pillar 2B — Parameterized ECSQL Query & Live Compiled Preview: Power users can edit the underlying ECSQL directly and verify token substitution in the Compiled ECSQL Preview banner at the bottom of the editor.

Standard 4-Column ECSQL Projection Contract

Every standard CAD-QA query must project four columns grouped per deliverable model:

SELECT
  COALESCE(rl.UserLabel, 'Unassigned_Model') AS modelName,
  COUNT(ge.ECInstanceId) AS elementCount,
  SUM(CASE WHEN REGEXP(COALESCE(ca.UserLabel, ca.CodeValue, ''), '{levelRegex}') THEN 1 ELSE 0 END) AS goodCount,
  SUM(CASE WHEN REGEXP(COALESCE(ca.UserLabel, ca.CodeValue, ''), '{levelRegex}') THEN 0 ELSE 1 END) AS badCount
FROM bis.GeometricElement3d ge
JOIN bis.Category ca ON ca.ECInstanceId = ge.Category.Id
LEFT JOIN bis.ExternalSourceAspect esa ON esa.Element.Id = ge.ECInstanceId
LEFT JOIN bis.ExternalSource es ON es.ECInstanceId = esa.Source.Id
LEFT JOIN bis.RepositoryLink rl ON rl.ECInstanceId = es.Repository.Id
GROUP BY COALESCE(rl.UserLabel, 'Unassigned_Model')

(For rules using evaluationMode: 'discipline_homogeneity', the query projects modelName, originatingDiscipline, and elementCount.)


Recording Approved Amber Variations (Pillar 3)

Under UK infrastructure CAD standards—such as Network Rail NR/L2/INI/EDT/CP0091 Clause 4 and National Highways DMRB GG 101—RED rules are absolute submission blockers, whereas AMBER rules permit project-specific variations when formally approved by the Information Manager or Technical Authority.

When editing any rule with RAG Gate Severity = Amber, an Approved Amber Variation Record panel appears:

How Amber Variations Affect Scoring & Audit Traceability