The first example in the video: cutting walls on a faceted facade, where "Attach Top/Base" is not enough and, by hand, you would have to edit the profile of each wall.
What you need
- Revit 2021 to 2027, the versions supported by pyRevit 7.
- pyRevit 7, a free, open-source add-in to add your own Python buttons to Revit.
- Claude Desktop, signed in to your account: its Code tab is Claude Code.
The 5 steps
- Install pyRevit 7 from its GitHub page, with Revit closed. The non-"admin" version installs without administrator rights.
- Create the folder in
%APPDATA%\pyRevit\Extensions(a hidden folder: show hidden items). The suffixes matter, they are what pyRevit reads:MIRALTO.extension›MIRALTO.tab›Walls.panel. - Open Claude Code in Claude Desktop (Code tab), pick the
.extensionfolder and describe the button. - Reload pyRevit: pyRevit tab › Reload. No need to restart Revit.
- Test the button: pick the walls, then the faceted facade.
The prompt for the first button
In MIRALTO.tab\Walls.panel, create a pyRevit button "Trim Facade". I select walls, then the faceted façade (a closed volume: mass or generic model). For each wall, edit its profile (like "Edit Profile") to keep only the part inside the volume, cut exactly along the facets. Skip walls that don't touch the façade, do everything in one transaction, and show how many walls were cut at the end.
Be precise: what gets selected, the method (here, editing the wall profile, so it stays a normal wall) and what happens when a wall doesn't touch the façade. Claude asks before writing to your disk, then creates a single file, script.py, with the button's name and tooltip at the top, then the code.
More buttons
The same method works for every task that comes back. In the video:
- Split floors with a mass
- One 3D view per level
- Renumber rooms by click
And whatever you need, for example: "Align every tag in the view", "Create sheets from an Excel list", "Check every door has a number", "Rename views to our naming standard".
Test on a copy of the project first. The script works inside a transaction: a single Ctrl+Z undoes everything.
Live
This tutorial shows the short version of the method. The online sessions go further: concrete uses of AI shown live, and answers to your questions. See the sessions.