Tapir / Tutorials / Number doors and windows

Number doors and windows by room in Archicad.

Door and Window Numbering by Zone, a script that comes with Tapir, gives every door and window an Element ID built from the zone it opens into, such as 1.04-D1 or 1.04-W2, numbered within each zone.

  1. Open the script

    Install the Tapir Add-On with the Tapir Installer, as Get started shows, and start Archicad with a project open. Choose Tapir Palette from the Tapir menu.

    Door and Window Numbering by Zone is a built-in script: open the floor plan, pick DoorWindowNumberingByZone in the palette's list and click Run Script. It reads the doors and windows of the current story and shows the new IDs next to the current ones; nothing is changed yet. It is also on the Scripts page as Door and Window Numbering by Zone.

  2. Choose the elements

    In Elements, choose Selection, Current story or Whole project, then press Read elements.

  3. Set the patterns

    The list of new IDs updates as you type.

    • Doors and Windows are the patterns of the IDs, {zone}-D{n} and {zone}-W{n} at first. {zone} is the zone number, {name} the zone name (also used for {zone} when the zone has no number) and {n} the running number within the zone.
    • Start at is the first number in each zone, 1 at first.
    • Digits is the least number of digits of {n}, padded with zeros: 2 gives 01.

    The script warns when new IDs repeat.

  4. Rename

    Press Rename and confirm. The script changes the Element ID of each door and window whose new ID differs from the current one, and you can undo it in Archicad. The status column shows the elements that could not be changed and why. In a Teamwork project, an element you have not reserved may not be changed.

How it finds the zone.

Each door or window belongs to the zone on its "to" side, or to the zone on its "from" side when there is none. Within a zone they are numbered clockwise around the zone stamp, starting from the north. Zones with the same number continue one count, from north to south. Doors and windows without a zone are listed separately, with the reason, and are not renamed. Skylights and curtain wall panels are not numbered.

The script reads the zones of the doors and windows with GetRelationsOfElements and their positions with Get3DBoundingBoxes, and writes the IDs with SetElementInfoStrings. Its code is builtin-scripts/DoorWindowNumberingByZone.py. It works in Archicad 26 to 30 with Tapir 1.8.0 or later; Archicad 25 cannot tell which zone a door or window opens into.