2.7 KiB
Revit 2026 / Dynamo diagnostics
This directory contains self-contained Python scripts for a Dynamo Python Script node. They use only Dynamo's built-in Revit integration, the Revit API and the Python standard library. No Dynamo package is required.
The scripts are read-only. They do not start a Revit transaction and do not change the open model.
Python engine
Use the built-in CPython3 engine in Revit 2026. Autodesk ships Dynamo with
Revit; optional PythonNet3 packages are not required by these diagnostics.
01 - Check model identity
File: 01_check_model_identity.py
The script reports:
- Revit, Dynamo and Python versions;
ProjectInformation.UniqueIdas a native model-identity candidate;- all occurrences and values of
LB_ModelIdandLB_ProjectIdon Project Information; - all Project Information parameters;
- optional cloud/worksharing identity information when the API exposes it.
Input IN[0] is optional. It may be either an output directory or a complete
.json file path. With no input, the report is written below the current
Windows temporary directory in leistungsbilanz-dynamo.
02 - Inventory Electrical Fixtures parameters
File: 02_export_electrical_fixture_parameter_inventory.py
The script reads every instance of
BuiltInCategory.OST_ElectricalFixtures in the complete current document. It
exports:
- element, family, type and MEP Space identities;
- every instance parameter and value;
- every unique family-type parameter and value;
- an aggregated parameter inventory with occurrence counts and sample values;
- per-element warnings instead of aborting at the first unreadable element.
Inputs:
IN[0](optional): output directory or complete.jsonpath;IN[1](optional): include empty parameters, defaulttrue;IN[2](optional): maximum sample values per aggregated parameter, default5.
The default output location is again the Windows temporary directory. The generated report can contain model paths and project-specific parameter values; review it before sharing or committing it.
Running a script
- Open the target model in Revit 2026.
- Open Dynamo from Manage > Visual Programming > Dynamo.
- Create a graph and add a Python Script node.
- Select the
CPython3engine for the node. - Copy the complete content of the desired
.pyfile into the node. - Optionally connect a String node containing the output path to
IN[0]. - Run the graph and inspect
OUTfor status, counts and the generated path.
For the first test, run 01_check_model_identity.py in the Revit main model.
Then run the parameter inventory. Keep both generated JSON files so their
structure can be checked before the production snapshot DTO is finalized.