Automating ID assignment for multiple model elements can significantly reduce manual work and errors, especially when a clear spatial sequence is required (for example, rooms along a corridor, parking spaces along a lane, or furniture along a path). This article describes how element IDs can be automatically assigned based on their sequential position along a polyline in Archicad, using a Python script and the Tapir plugin. The method helps maintain consistent ordering across large projects while minimizing repetitive manual renumbering.
Issue description
Managing large sets of elements often requires a logical ID sequence, but assigning those IDs manually is time‑consuming and inconsistent. Numbering rooms, parking spots, or furniture items one by one increases the risk of gaps, duplicates, and ordering mistakes, especially when changes occur during design development. Maintaining a clear spatial sequence across the project becomes an additional coordination task instead of a background operation.
Solution
A Python script integrated with the Tapir plugin enables automatic numbering of selected elements according to their position along a polyline placed in the floor plan. he workflow was developed and shared by Community members,
Requirements
Python
- Install the latest Python version from python.org for the relevant operating system.
- During installation, the “Add Python to PATH” option must be enabled to allow the script to run from the system environment.
Tapir plugin
- Download the Tapir Archicad automation plugin from the Tapir GitHub repository and complete installation using the provided setup guide.
Steps to use the script
-
Download the Python script (comes packaged with Tapir in its latest version)
Download -
Place a polyline in your floor plan – no separate object is required (as the script now works directly with polylines).
-
Select elements and the polyline you want to use as the numbering guide.
-
For labels, use the Label Tool; these are not generated automatically by the script.
-
-
Run the script
-
Open via the Python Palette or double-click the
.pyfile. -
It will connect with the running Archicad instance.
-
-
Enter the starting number when prompted (e.g., 1, 101, etc.).
The script then automatically updates element IDs based on their sequential position along the polyline.
How the script works
-
Collects polyline coordinates.
-
Identifies the center point of each selected element.
-
Matches each element to the closest point along the polyline.
-
Sorts elements in order along the polyline.
-
Assigns element IDs in that spatial order.
Result
This workflow transforms what is normally a slow, manual operation into a streamlined automated process. Elements are numbered consistently, errors are reduced, and spatial logic is preserved throughout the project. Whether numbering rooms, parking spaces, or pieces of furniture, this approach delivers both speed and accuracy.
These techniques were originally shared by Community member @Mathias Jonathan. If you’d like to explore the original discussion, click here to read the full thread!
This article is part of the ‘Tip of the Month’ series on Graphisoft Insights, highlighting valuable community-driven solutions for modeling challenges. Try these methods in your next project and experience the difference in model quality and efficiency.