Tapir / Get started

Get started.

From download to your first script in about ten minutes. Steps 1 to 3 need no programming.

Video Prefer watching? The Tapir video tutorials walk through installing Tapir and using it.

  1. Install Tapir

    With the installer (recommended). It finds every Archicad version on the computer and installs the matching add-on into each, so Archicad loads it on its next start.

    • Windows: the installer asks for administrator rights, because it copies the add-on into the Archicad folder under Program Files.
    • macOS: unzip the download and open the app.

    Prefer to install by hand? Download the TapirAddOn_AC<version>_Win.apx or TapirAddOn_AC<version>_Mac.zip file for your Archicad version from the latest release, then in Archicad: Options > Add-On Manager > Edit List of Available Add-Ons > Add, browse to the file and click OK.

    Tapir keeps itself up to date: it tells you when a new version is out and installs it for you.

  2. Run your first script

    Tapir adds a Tapir menu to Archicad. Choose Tapir Palette from it, pick a script in the palette's list and click Run Script. The built-in scripts are there from the start: try ProjectHealthCheck, which lists elements without an ID, zones with the same number, unclassified elements and more. It only reads the model.

    Tapir runs the scripts with uv, which brings the Python and the packages each script needs. If uv is not installed yet, Tapir offers to install it the first time you run a script.

    Manage Shortcuts on the palette puts up to six scripts in the Tapir menu, as Run Script Shortcut 1 to 6.

  3. Add more scripts

    The Scripts page collects scripts shared by the community, each one reviewed before it is listed. The Tapir palette is getting a window to find and install them in one click.

    Until then If your palette has no such window yet, add a script by hand, as below.

    Download the scripts you want into a folder, then tell Tapir about that folder in its configuration file, Documents/Tapir/config.json in your user folder (Tapir writes it the first time it runs). Add the folder to its localFolders list, keeping the rest of the file as it is:

    Documents/Tapir/config.jsonJSON
    {
        "repositories": [ ... ],
        "localFolders": [
            {
                "displayName": "My scripts",
                "path": "C:\\Users\\me\\Documents\\Tapir scripts"
            }
        ],
        ...
    }
    • path is the folder (on macOS for example /Users/me/Documents/Tapir scripts). In JSON, a Windows path's backslashes are doubled.
    • displayName is the name the palette shows for the folder's scripts; without it, the folder's name is used.
    • Optionally, includePattern and excludePattern are regular expressions that choose which files of the folder the palette lists.

    The palette lists the folder's scripts next to the built-in ones the next time it loads its scripts.

  4. Write a script of your own

    Archicad answers JSON commands on http://127.0.0.1:19723 while a project is open (with several Archicads open, the next ones use 19724, 19725 and so on). Tapir's commands are called through Archicad's API.ExecuteAddOnCommand command, in the TapirCommand namespace. Python's standard library is enough; there are no packages to install.

    version.pyport 19723
    import json
    import urllib.request
    
    def run_tapir_command(command, parameters=None):
        request = urllib.request.Request('http://127.0.0.1:19723')
        request.add_header('Content-Type', 'application/json')
        body = json.dumps({
            'command': 'API.ExecuteAddOnCommand',
            'parameters': {
                'addOnCommandId': {'commandNamespace': 'TapirCommand', 'commandName': command},
                'addOnCommandParameters': parameters or {}
            }
        }).encode('utf-8')
        with urllib.request.urlopen(request, body) as response:
            result = json.loads(response.read())
        if not result['succeeded']:
            raise RuntimeError(result['error'])
        return result['result']['addOnCommandResponse']
    
    print(run_tapir_command('GetAddOnVersion'))
    # prints the version of the add-on Archicad has loaded, e.g. {'version': '1.8.0'}

    Graphisoft's archicad package sends the same commands and finds the port by itself, if you prefer it. Put your script in a local folder to run it from the Tapir palette.

    All commands, with schemas and examples →

  5. Use it from Grasshopper

    In Rhino, open the Package Manager (the PackageManager command, or Tools > Package Manager), search for tapir, install it and restart Rhino. Its components are on the Tapir tab in Grasshopper and work with the Archicad that runs Tapir. The Walls, Doors, Windows and Railings components read and change Archicad elements with the names you know from Archicad's settings dialogs.

    The Grasshopper guide →