Sample Code Revit Batch Processor 1.1.16 documentation
A pyRevit toolbar extension for Revit, providing automation tools for BIM workflows across family management, export, view management, model maintenance, and more.
Panels and button groups are listed in ribbon order, matching the extension’s bundle layouts. Names are the labels shown in Revit.
Reference links. Neither button touches the model.
Button Group |
Description |
|
|---|---|---|
|
Open the extension licence on GitHub, or the Icons8 site the icons come from |
Tools for working with cloud-hosted Revit models.
Button Group |
Description |
|
|---|---|---|
|
Retrieve cloud project and model GUIDs for the model and all its links, for Revit Batch Processor task files |
Tools for controlling grid bubble and level header visibility, and 2D/3D extent behaviour, in the active view.
Button Group |
Description |
|
|---|---|---|
|
Show or toggle grid bubbles at either end, switch grids to 2D, extend grids to the view crop, propagate grid setup to other plan views |
|
|
Show or toggle level headers at either end, switch levels to 2D |
Tools for propagating and transferring view template settings, filters and colour schemes.
Button Group |
Description |
|
|---|---|---|
|
Propagate filter and category overrides from a source view template to many others; delete filters from templates |
|
|
Export and import view template overrides and view filters as JSON, and colour fill scheme values as CSV |
Tools for managing Revit schedules on sheets and in views.
Button Group |
Description |
|
|---|---|---|
|
Manage column widths; report and fix schedule segment overlaps on sheets; export, extract and import Room: Number filter values |
Tools to remove unused elements from the model. Every tool asks what to remove before deleting anything.
Button Group |
Description |
|
|---|---|---|
|
Purge unused line styles, fill patterns, line patterns, shared parameters, filters, legends, schedules, view templates and unplaced views |
Tools for resolving and locating common Revit warnings on rooms, areas and annotation.
Button Group |
Description |
|
|---|---|---|
|
Fix room tags outside rooms, duplicate marks, and overlapping area or room separation lines |
|
|
Report area and room separation lines carrying warnings, and colour-highlight them in the active view |
Tools for loading, saving, renaming, swapping and reporting on Revit families and type catalogue files.
Button Group |
Description |
|
|---|---|---|
|
Reload families from a library folder, with match-status filtering |
|
|
Rename loaded families and types, or rename |
|
|
Load families from a folder into the project, or save loaded families out to a folder |
|
|
Export and clean type catalogue files; strip a family back to a single catalogue placeholder type |
|
|
Force Revit to detect a family as changed when source files have been overwritten |
|
|
Reassign the open family to a different Revit category, preserving subcategories |
|
|
Report on and compare family libraries and projects, via XML part atom exports |
|
|
Replace family instances with a different type, by CSV directive folder, selection or picking |
|
|
Open the AtTheLibrary tool for managing shared type catalogue parameters |
Button Group |
Description |
|
|---|---|---|
|
Create a ceiling matching the boundary of each selected room |
Tools that relate walls and facade openings back to the rooms they bound.
Button Group |
Description |
|
|---|---|---|
|
Write the room number onto the walls bounding each selected room |
|
|
Report external wall and window opening areas per room to CSV |
Tools for managing mock rooms — room-like families that carry room data — and the data pushed into them.
Button Group |
Description |
|
|---|---|---|
|
Open the PushIt application for loading room data and pushing it into mock rooms |
|
|
Build mock room families from filled regions; set the family output directory |
|
|
Swap the width and depth values on picked mock rooms and rotate them 90 degrees |
|
|
Report mock room counts by family, creator and owner; flag IDs duplicated across design sets |
|
|
Create native Revit rooms at the locations of mock rooms, read from this model or a link |
|
|
Measure mock rooms with temporary Revit rooms and write the area back onto them |
Tools for exporting sheets, checking exports, and syncing document data.
Button Group |
Description |
|
|---|---|---|
|
Export sheets to PDF and/or DWG with configurable naming rules and print sets |
|
|
Check the sheets in a Revit schedule against the PDF files in a folder |
|
|
Sync sheets and revisions from the model to a Document Manager database; configure document numbering |
Scripts for exporting model data to file for reporting and audit purposes.
Button Group |
Description |
|
|---|---|---|
|
Export rooms, spaces, sheets, ceilings, floors, doors, levels and placed items to JSON — from the active model and its Revit links |
Integration with a local RoomMate server.
Button Group |
Description |
|
|---|---|---|
|
Push room and door data from the model and its links to a local RoomMate server |
Install pyRevit if not already installed.
Copy the extension folder to your pyRevit extensions directory, or add it via pyRevit settings.
Restart Revit — the duHast tab will appear in the ribbon.
Refer to the individual docs linked above for prerequisites and configuration before first use.
Three things decide whether a button will work at all. Each doc repeats the ones that apply to it, but they are worth knowing up front.
Some tools only run on a family open in the Family Editor. They exit with “This is not a family document.” if run from a project: Change Category, Force Update and all three Catalogue Files tools.
Some tools store their settings in the Revit model and refuse to start until a Settings button has been run on that model: PDF/DWG Export, docManager and Get A Room!. Settings are held in an extensible schema, so they travel with the file but do not travel between files.
Some tools open a .NET window loaded from the extension’s bin folder at run time. If
that folder is missing or incomplete the button fails immediately with a message about the
bin directory. This applies to Push It!,
At The Library, Reload,
PDF/DWG Export and docManager.
A few tools are also driven by constants edited in the extension’s lib folder rather than by
a dialog — see Facade Opening To Room,
Ceilings By Room and Reports.
Revit 2025 or later — the extension declares min_revit_ver: 2025, with engines
configured for 2025 and 2026.
pyRevit (latest stable version recommended).
duHast Python library — bundled in the extension under lib/duHast.
The extension’s bin folder, for the tools that open a .NET window.