Tutorials

How to Automate TIA Portal with Openness API

The definitive guide to transforming your Siemens engineering workflow into a modern DevOps pipeline.

T
T-IA Connect Team
10 min read
Updated Feb 8, 2026

Why Automation is Inevitable

Manual engineering in TIA Portal is slow and error-prone. Right-clicking, creating blocks, copy-pasting code... These repetitive tasks must disappear. Thanks to the Openness API (and its T-IA Connect REST wrapper), you can drive TIA Portal like any modern software.

Prerequisites

  • TIA Portal V16, V17, V18, V19 or V21 installed
  • A T-IA Connect license (or trial version)
  • Node.js or Python installed on your machine

Step 1: Start the REST API

Instead of launching TIA Portal manually, we will start the T-IA Connect server which will act as a gateway. Open your terminal and run:

PowerShell
./TiaPortalApi.App.exe --headless

Step 2: Create a Project via Script

No more 'File > New' menus. Let's send a POST request to instantiate a blank project.

POST /api/project/create
{
  "name": "My_Automated_Project",
  "path": "C:\\Projects",
  "version": "V19"
}

Step 3: Generate SCL Code

This is where the magic happens. We will inject a complete Function Block (FB) directly into the project.

L'API permet d'injecter des blocs à partir de templates XML ou directement via du code source SCL. C'est l'outil idéal pour les générateurs de code.

What's Next?

You have just automated 90% of the manual project creation tasks. You can now integrate this script into your CI/CD pipeline (Jenkins, GitLab CI) to validate your code on every commit.