License delivery maintenance is planned for Saturday, July 26, between 12:00 and 20:00 CEST. During this time, you may experience outages or limited availability across our services, including BIMcloud SaaS, License Delivery, Graphisoft ID (for customer and company management), Graphisoft Store, and BIMx Web Viewer. More details…

Tip of the Month: Auto-number elements using a polyline in Archicad

This month’s tip comes from @Mathias Jonathan, who shared a solution to automatically number elements in Archicad based on their position along a polyline. This script works with Python and the Tapir plugin, giving you a quick way to assign element IDs in a meaningful spatial order. 

 

It’s especially useful when you want to number rooms, furniture, or parking spots following a path—like a corridor or street layout—without doing it manually. 

 

Beginner-friendly tip: You don’t need to write code. 
This script is ready to run. Once Python and Tapir are installed, all you need to do is double-click the script file or use the Python Palette in Archicad. It asks for a start number and does the rest automatically. 

 

What you need 

 

Update (June 2025)

 

The latest Tapir installation now includes the script by default. Look for AutomaticNumberingBasedOnPolyline in the Tapir Python palette. You no longer need a GDL object—just select your elements and one polyline, then run the script.

 

Before running the script, install: 

  1. Python (latest version from python.org) 
    • Choose the version for your operating system. 
    • During setup, check “Add Python to PATH” before clicking Install. 
  2. Tapir Plugin 
    • Download from Tapir GitHub 
    • Follow their step-by-step install guide (below Download table) 

 

How to use the script 

  1. Download the GDL object + Python script 
    Download

  2. Load the GDL object 
    • The object is called AutomaticNumberingPolyline 
    • To load: Object tool > Object Default Settings (Ctrl+T on Windows, Cmd+T on Mac) > Load Other Object > Locate the downloaded object

      01 Object setting_Load object.png

      MolindaPrey_0-1750158342584.png

       

    • Alternatively, you can drag the object directly into the floor plan.
       
  3. Place the Polyline object into the floorplan. Select it, adjust parameters if needed (e.g., number of nodes or appearance).

    02 Place GDL Polyline on FP.png

  4. Select Elements + Polyline object 
    • Select both the AutomaticNumberingPolyline and all elements you want to number. 
    • Note: If you want the labels to appear as shown in the image below, use the Label Tool. The labels are not generated by the object or the script. 
      03 Select elements + PL obj.png
  5. Run the Script

    • Open the Python Palette or double-click the .py script file.

    • The script will use the first running Archicad instance.

      04 Python script.png

  6. Enter the Starting Number: You’ll be prompted to enter a number (e.g. 1, 101, etc.).
     05 Add starting number.png

    • Note: If an error occurs while running the script, you might be missing the “archicad Module. Here’s a quick fix: open Terminal or Command Prompt. Run: pip install archicad. If that fails, try: pip install --user archicad. 
      To avoid this issue, make sure Python is installed from python.org and added to PATH during setup 

  7. Done: Element IDs update automatically based on their position along the polyline.

06 Done_result.png

How the script works 

 

  1. Gets polyline coordinates from the GDL object 
  2. Gets the center point of each selected element 
  3. Measures which point on the polyline is closest 
  4. Sorts the elements by how far along the polyline their closest point is 
  5. Assigns Element IDs in that order 

 

See it in action 

 

Watch the video demonstrated by Mathias. You’ll get a sense of how fast this method is. 

 

 


This script helps streamline repetitive documentation tasks. It saves time to automate what is normally a manual process, reduces the chance of errors, and applies a spatially consistent logic to your annotation. 

 

Thanks to @Mathias Jonathan  for the concept and implementation, and special thanks to @Tibor Lorantfy— these scripts wouldn’t exist without his work. Click here to read the original forum post

 

If you’ve got a workflow hack of your own, share it in the Graphisoft Community—it could be next month’s highlight! 
 

Cheers 🎉

Share:
Authors