Skip to content

User diagnostics

github-actions[bot] edited this page Oct 18, 2026 · 5 revisions

lang: en

Language: English · Русский

The list and behavior of diagnostics is defined through a configuration file with a .yaml extension, which in turn must be located at the path specified by the convention. The file must be named config.yaml.

Ready-made file: config.yaml.


Example configuration:

- code: "CSTM001"
  description: "custom"
  message: "For the element named '{elementName}' with identifier '{elementId}', the 'Марка' and/or 'Комментарии' parameters are incorrectly set. Execution time '{duration}' ms."
  isObsolete: true
  takeDocument: "!property('IsFamilyDocument')"
  take: "instance and builtincategory('OST_Walls')"
  check: "parameter(me, 'Комментарии') == 'Ура!' & parameter(me, 'Марка') == 'Ура!'"
- code: "CSTM002"
  description: "custom"
  message: "For the element named '{elementName}' with identifier '{elementId}', the name is incorrectly set"
  severity: "Message"
  isActive: false
  isObsolete: true
  obsoleteDescription: "Some text describing the reason the check is obsolete"
  takeDocument: "true"
  take: "instance and builtincategory('OST_Walls')"
  check: "property('Name') == '1'"
  tags: ["Walls", "Naming"]
- code: "CSTM003"
  ...

Parameters:

Field Type Input data type Formula return type Purpose
code string string - Unique identifier of the diagnostic
description string string - Description of the diagnostic
message string string - Error message template. Available variables: {elementName}, {elementId}, {duration} (default: the localized generic template) (optional)
severity enum string - [[Severity level
isActive boolean bool - Whether the diagnostic is active (default: true) (optional)
isObsolete boolean bool - [[Whether the diagnostic is obsolete
obsoleteDescription string string - [[Description of the reason for obsolescence
takeDocument string string bool [[Document filtering formula
take string string ElementFilter [[Element filtering formula
check string string bool [[Element check formula
fixes sequence - - Optional Fix pipelines offered for invalid elements.
tags sequence of strings string - Tags used to find the diagnostic in the panes and shown in the reports (default: none) (optional)

Notes:

  • If the message field is not specified, it defaults to the localized generic template
  • If the severity field is not specified, it defaults to Message
  • If the isActive field is not specified, it defaults to true
  • If the isObsolete field is not specified, it defaults to false
  • Tags are free text; the search and the tag matching ignore case. The document-kind tags Project (runs in project documents) and Family (runs in family documents) are ordinary tags a rule declares in tags; see Diagnostic tags for the product's reserved tags

Note: If config.yaml cannot be parsed, its diagnostic list is treated as empty instead of keeping previously loaded rules. Revit Linter reports the configuration error in the UI and writes the exception and configuration path to the application log.

Note: If takeDocument, take, or check cannot be compiled, the rule cannot perform that stage. The warning in the application log includes the rejected formula text so the failing expression can be identified.

Clone this wiki locally