Grid-Based Numbering is a pyRevit add-in that automates the assignment of two parameters to selected Revit elements:
- Grid Square: Determined based on the closest grid intersection (formatted as
{Vertical Grid}-{Horizontal Grid}
). - Number: Sequentially assigned based on the spatial proximity of each element relative to a user-selected starting element.
This tool is designed to work with Revit versions 2019 through 2024.
Clone this repository to your local machine:
git clone https://github.com/jcesarpolo/grid-tools.git
or use the "Download Zip" button on Github.
If you have not already installed pyRevit, follow the pyRevit installation guide to get started.
Option 1: Using the pyRevit CLI
-
Open PowerShell or Command Prompt
Ensure pyRevit CLI is installed by running:
pyrevit env
-
Install the Extension
Run the following command:
pyrevit extend ui grid-tools "https://github.com/jcesarpolo/grid-tools.git" --dest "C:\pyRevit\Extensions"
-
Reload pyRevit
Apply changes by reloading pyRevit:
pyrevit reload
-
Verify Installation
Check if the extension is installed:
pyrevit extensions list
The Grid Tools extension should now be available in Revit.
Option 2: Adding the extension manually
-
Open pyRevit Settings*
Go to pyRevit settings and locate the Custom Extensions Directory option.
-
Select the Parent Folder
When using this option, ensure you select the parent folder that contains the .extension folder.
-
Apply Changes
Save the settings, pyRevit will reload automatically.
For more details, check the "Adding Extensions Manually" section on the documentation.
In your Revit project, select the elements you want to number.
From the Grid Tools tab, click on the Grid-Based Numbering button.
When prompted, pick one element (from the initially selected set) as the starting element for numbering.
The script will:
- Verify (and, if necessary, create) the shared parameters Grid Square and Number.
- Calculate grid intersections from the model’s grids.
- Assign the Grid Square parameter to each selected element based on the nearest grid intersection.
- Assign a sequential Number to each element based on proximity to the starting element.
A message will confirm whether all selected elements were successfully numbered.
- Revit: 2019–2024
- pyRevit: Latest version
- Python: IronPython (as provided with pyRevit)