Tapir / Tutorials / Connect Grasshopper

Connect Grasshopper to Archicad.

Grasshopper talks to Archicad through two parts of Tapir: the Tapir Add-On in Archicad and the tapir package in Rhino. Install both, then read a wall and change one of its settings, without writing code.

  1. Install the Tapir Add-On in Archicad

    The Grasshopper components send their commands to the Add-On. Install it with the Tapir Installer, as Get started shows.

  2. Install the tapir package in Rhino

    In Rhino 7 or 8, open Tools > Package Manager (or type PackageManager), search for tapir and click Install. Restart Rhino.

  3. Open Archicad, then Grasshopper

    With a project open in Archicad, start Grasshopper. The Tapir tab appears in its toolbar. With more than one Archicad open, give the port of the one you want to the ConnectArchicad component (Tapir > General); the first Archicad uses 19723.

  4. Read a wall

    • In Archicad, select one wall.
    • In Grasshopper, place the SelectedElements component from Tapir > Elements. Its ElementGuids output holds the selected elements. After you change the selection in Archicad, recompute the canvas to read it again.
    • Place the Walls component from Tapir > Design Tools and connect ElementGuids to its ElementGuid input.
    • Press Refresh on Walls and connect a Panel to its GeometryAndPositioning_JSON output. It shows the settings of the wall's Geometry and Positioning panel, keyed by the labels of the Wall Settings dialog, such as Wall Height.

    For every wall of the project instead of the selection, use ElementsByType (Tapir > Elements): it comes with a list of element types connected to its ElementsType input, set to Wall.

  5. Change one value

    • Place a second Panel with the text below and connect it to the GeometryAndPositioning_JSON input of Walls.
    • Press Execute. The wall in Archicad is now 3.5 m high; Archicad reads the numbers as metres.
    • Only the keys you give are written; the other settings stay as they are. One JSON for several walls is written to all of them. The Errors output has a message for each wall that could not be changed.
    Panel → GeometryAndPositioning_JSONJSON
    {"Wall Height": 3.5}

    Nothing is written to Archicad until you press Execute, or Create, which makes new walls. The Grasshopper guide shows how to create a wall from two points.

The commands behind it.

SelectedElements sends GetSelectedElements and ElementsByType sends GetElementsByType. Refresh on Walls reads the walls with GetDetailsOfElements, Execute writes them with ModifyWalls and Create makes them with CreateWalls. Which other commands have a component is on the Grasshopper coverage page.