Chat with the Developer Assistant

Tekla Structures
Tekla Structural Designer
Tekla Tedds
Tekla Tedds for Word
Tekla PowerFab
Tekla PowerFab GO
Modified: 12 Mar 2025
Not version-specific
Tekla Tedds Tekla Tedds for Word
Not version-specific
Tekla Structures
Not version-specific
Tekla Structural Designer
Not version-specific
Tekla PowerFab Tekla PowerFab GO

Chat with the Developer Assistant

The Developer Assistant helps with writing macros and modifying models using the Tekla Structures Open API.

The Developer Assistant is available to Tekla Open API developers who have a valid Tekla Partners named user subscription license.

You can use the Developer Assistant in a web browser, but for a better experience, we recommend that you install the Trimble Assistant for Tekla Tekla Structures extension. For more information, see Interactive help for Tekla Structures in Trimble Assistant for Tekla.

Use the Trimble Assistant for Tekla extension in Tekla Structures to write, run, and save macros

The Trimble Assistant for Tekla extension in Tekla Structures lets you run the code that the Developer Assistant generates, and save macros directly in Tekla Structures. You can also view logs about successful execution of the generated code, and about errors when executing the generated code.

We recommend that you use the Default environment in Tekla Structures because the Developer Assistant uses profiles from that environment to generate code.

  1. In Tekla Structures, start the Trimble Assistant for Tekla extension in these ways:
    • On the AI tab of the ribbon, select Assistant.
    • In the Applications & components catalog, search for Trimble Assistant for Tekla.
  2. If the Developer Assistant is not already open, select Developer Assistant from the list of assistants in the toolbar.
  3. Write your prompt.

    Example: Generate a macro that lists all profiles used in the model and then displays them in a dialog.

    The Developer Assistant generates a response that includes a code block, an explanation of what the macro does, and the source of the information that the Developer Assistant used to generate the code.

    After code generation, the code is editable.

  4. To run the generated code as a macro in Tekla Structures, click Execute code.

    If the code execution is successful, the log is shown in a green color with the message "Done. Check the results in Tekla Structures."

    If an error occurs, the Run error log button appears below the code block. Click Run error log to show the error log.

  5. If needed, edit the code and run it again until the macro works the way that you want it to.

    You can also ask the Developer Assistant to help you refine the code.

  6. To save the generated code for future use, save the macro.
    1. Click Save macro.
    2. In the Name box, enter a name.
    3. In the Location box, select the location where you want to save the file.
    4. If you want to add a custom image to the macro, drag an image file to the Image box, or browse to the image file.
    5. Click Save.

    A confirmation message appears. The code is saved as a macro that can be started from the Applications & components catalog.

  7. To update the Applications & components to show the macro, select Applications & components > Options menu > Catalog management > Reload catalog.

Use the Developer Assistant in a web browser to write code for macros

  1. In a web browser, go to Trimble Assistant for Tekla.
  2. If the Developer Assistant is not already open, select Developer Assistant from the list of assistants in the toolbar.
  3. Write your prompt.

    Example: Generate a macro that lists all profiles used in the model and then displays them in a dialog.

    The Developer Assistant generates a response that includes a code block, an explanation of what the macro does, and the source of the information that the Developer Assistant used to generate the code.

  4. To copy the generated code, click the copy icon.
Was this helpful?
Previous
Next