TIA Portal Import — VS Code ExtensionBidirectional bridge between VS Code and Siemens TIA Portal — import PLC/HMI projects from TIA Portal to local files, edit them with full VS Code + Copilot power, and export changes back. Built on the TIA Portal Openness API.
Key FeaturesImport from TIA Portal (TIA → local files)
Local SimaticML Preview
Export to TIA Portal (local files → TIA)
Smart Capabilities
Copilot / AI Agent IntegrationThe extension exposes 18 Language Model Tools (prefix
Imports that overwrite existing TIA objects show a confirmation dialog unless Requirements
SIMATIC Automation Compare Tool (ACT) is optional and must be installed separately from Siemens Support when you want graphical local XML previews or Git revision diffs. The extension does not bundle ACT. 👉 Download: SIMATIC Automation Compare Tool — Siemens Support (109797235)
Installation
UsageConnecting to TIA Portal
Importing from TIA Portal
Exporting to TIA Portal
Previewing local SimaticML XML
The preview command is contributed only to the Explorer right-click menu and does not require a TIA Portal connection. It validates the selected file before the ACT renderer starts; SCL, SD, DB source, hardware config XML, watch/force tables, unknown XML and know-how protected placeholders are rejected with a message. By default Comparing Git revisions in ACT
The diff opens in the same embedded ACT webview used by the single-file preview, so LAD/FBD network changes stay graphical and reviewable inside VS Code. For Exported Directory StructureWhen you connect to TIA Portal (or run the
Template files (
You can also scaffold the workspace manually at any time via Workspace Templates (
|
| File / Folder | Purpose |
|---|---|
.github/copilot-instructions.md |
Instructions for GitHub Copilot (and other AI assistants) that teach the model how to work with Siemens TIA Portal XML files. Covers SimaticML XML structure,.s7dcl / .s7res file conventions, MLC ID handling, network titles/comments, and rules for updating ProjectDescription.md. These instructions are automatically picked up by Copilot in VS Code. |
.github/ProjectDescription.md |
A living document describing the project's architecture, communication topology, block hierarchy, data structures, and data flow. Initially empty — it is populated automatically by Copilot when you start analyzing the project (as instructed by copilot-instructions.md). Should be kept up to date when blocks, communication channels, or data structures change. Includes Mermaid diagrams for visual documentation. |
.github/Schemas/ |
SimaticML XSD schema files (SW.PlcBlocks.*.xsd, SW.Common_v3.xsd, etc.) copied from Documentation/Schemas/. These schemas enable XML validation and IntelliSense for exported TIA Portal block files directly in VS Code. |
.gitignore |
TIA-specific ignore rules (e.g..tia-cache, CLAUDE.local.md) to keep temporary/cache files out of version control. |
CLAUDE.md |
Instructions forClaude Code. Uses Claude's native @<path> import syntax to re-export the full ruleset from .github/copilot-instructions.md, so all AI agents share a single source of truth. Add machine-local notes to CLAUDE.local.md (already gitignored). |
AGENTS.md |
Follows the openagents.md standard — read by Cursor, Aider, OpenAI Codex, Gemini CLI, Jules and other AI coding agents. Links to .github/copilot-instructions.md for the full ruleset and lists build / test / code-style essentials. |
Tip: Commit the
.github/directory to your Git repository so that every team member and CI pipeline benefits from the same AI instructions, project documentation, and XML schemas.
Extension Settings
| Setting | Description | Default |
|---|---|---|
tiaImport.exportFolderName |
Folder name for TIA exports | TiaExport |
tiaImport.tiaPortalPath |
Path to TIA Portal installation | C:\…\Portal V21 |
tiaImport.autoConnect |
Auto-connect on activation | false |
tiaImport.includeComments |
Include comments in export | true |
tiaImport.exportFormat |
Block export format (xml / sd) |
xml |
tiaImport.tagTableFormat |
Tag table export format (xml / xlsx) |
xlsx |
tiaImport.preserveTimestamps |
Preserve original timestamps | true |
tiaImport.excludeSystemBlocks |
Exclude system blocks | true |
tiaImport.dotnetPath |
Path to .NET runtime | Auto-detect |
tiaImport.dbExportFormat |
Global DB export format (xml / db) |
db |
tiaImport.showImportExportDetails |
Show detailed import/export messages in the output log | false |
tiaImport.importProgress.itemsPerSecond |
Speed multiplier for the time-based import progress model used by project/device/category and category HW Config imports.1.0 uses the built-in weighted calibration plus a 10% safety buffer; increase it if your TIA exports are faster, decrease it if they are slower. |
1 |
tiaImport.compileAfterExport |
Compile PLC software after export (always / ask / never) |
ask |
tiaImport.autoExportCrossReferences |
Generate cross-reference dump after import (always / ask / never). In ask mode the prompt is shown per PLC when the dump is about to start and auto-skips after 5 s if you don't respond. ⚠️ Building the table can take several minutes — 10 min+ on large PLCs because TIA Portal computes it itself. Default is therefore ask. |
ask |
Block Export Formats
| Format | Extension | Description |
|---|---|---|
| xml | .xml |
SimaticML XML — full block data with interface sections, networks, and metadata. Default TIA Portal format. |
| sd | .scl / .s7dcl + .s7res |
SIMATIC Source Documents — auto-selects per programming language: SCL blocks →.scl (via GenerateSource), LAD/FBD/STL blocks → .s7dcl + .s7res (via ExportAsDocuments). Ideal for version control. |
Global DB Export Formats
Controlled by tiaImport.dbExportFormat (applies only to Global Data Blocks; Instance DBs always use XML):
| Format | Extension | Description |
|---|---|---|
| xml | .xml |
SimaticML XML — standard TIA Portal format |
| db | .db |
Text-based DATA_BLOCK source via GenerateSource API — compact, diff-friendly, importable back to TIA Portal |
Tag Table Export Formats
| Format | Extension | Description |
|---|---|---|
| xml | .xml |
SimaticML XML — native TIA Portal format |
| xlsx | .xlsx |
Excel spreadsheet — sheets "Tags" and "Constants", with Siemens-style formatting. Editable in Excel, importable back to TIA. |
Commands
Import Commands (TIA → local)
| Command | Description |
|---|---|
TIA Import: Connect to TIA Portal |
Connect / attach to a running TIA Portal instance |
TIA Import: Disconnect from TIA Portal |
Disconnect from TIA Portal |
TIA Import: Select Project |
Select a project from the connected TIA Portal |
TIA Import: Import Entire Project |
Import full project structure |
TIA Import: Refresh Project Structure |
Refresh the project tree |
TIA Import: Import Device |
Import a device with all software |
TIA Import: Import Block |
Import a single block |
TIA Import: Import Block Folder |
Import a block group/folder |
TIA Import: Import Tag Tables |
Import all tag tables |
TIA Import: Import Tag Table |
Import a single tag table |
TIA Import: Import Data Types |
Import all UDTs |
TIA Import: Import Data Type |
Import a single UDT |
TIA Import: Import Watch Tables |
Import all watch tables |
TIA Import: Import Watch Table |
Import a single watch table |
TIA Import: Import HMI Screens |
Import HMI screens |
TIA Import: Import HMI Tags |
Import HMI tags |
TIA Import: Import HMI Connections |
Import HMI connections |
TIA Import: Import All HMI Elements |
Import all HMI elements |
TIA Import: Import HW Configuration |
Import full HW configuration |
TIA Import: Import Device HW Configuration |
Import HW config for a single device |
TIA Import: Import Programs for All Devices in Category |
Import all devices in a category |
Export Commands (local → TIA)
| Command | Description |
|---|---|
Export Blocks to TIA |
Export a block file (XML / SCL / SD) to TIA Portal |
Export Blocks to TIA (Folder) |
Export all blocks in a folder |
Export to TiaPortal: XML File |
Export a single XML file (non-block) |
Export to TiaPortal: XML Folder |
Export an XML folder |
Export XLSX Tags to TIA Portal |
Export XLSX tag table to TIA Portal |
Export XLSX Tags to TIA Portal (Folder) |
Export all XLSX tag tables in a folder |
Export to TiaPortal: HW Config XML |
Export HW config (XML/AML) |
Export to TiaPortal: HW Config Folder |
Export HW config folder |
Export to TIA - Program and HW |
Unified export (program + HW config) |
Export to TIA - Program without HW |
Unified export (program only, no HW) |
Utility Commands
| Command | Description |
|---|---|
TIA Import: Show Logs |
Open the extension output channel |
TIA Import: Open Settings |
Open extension settings page |
TIA Import: Select Export Format |
Switch block export format |
TIA Import: Format PLC Tags |
Toggle tag table format (XML/XLSX) |
TIA Import: Prepare Workspace |
Scaffold workspace (.github/, TiaExport/) |
Architecture
┌─────────────────────────────────────────────────────────────┐
│ VS Code Extension │
│ │
│ ┌────────────┐ ┌─────────────┐ ┌───────────────────────┐│
│ │ Commands │ │ Providers │ │ Utilities ││
│ │ (import/ │ │ (tree view, │ │ (logger, config, ││
│ │ export) │ │ connection)│ │ statusBar, workspace)││
│ └──────┬─────┘ └──────┬──────┘ └───────────────────────┘│
│ │ │ │
│ ┌──────▼───────────────▼──────────────────────────────────┐│
│ │ Services Layer ││
│ │ tiaConnection · projectImport · tiaOpennessBridge ││
│ │ blockImport · tagTableImport · udtImport ││
│ │ watchTableImport · hmiImport ││
│ └──────────────────────┬──────────────────────────────────┘│
│ │ electron-edge-js │
└─────────────────────────┼───────────────────────────────────┘
│
┌─────────────────────────▼───────────────────────────────────┐
│ .NET Wrapper (C#) │
│ │
│ TiaConnector.cs ─► TiaPortalService.cs │
│ │ │
│ ┌──────────────────────┼──────────────────────────────┐ │
│ │ Services/Export/ │ │
│ │ Software: BlockExportHandler, TagTableExport, │ │
│ │ UdtExport, WatchTableExport, SdExportHandler, │ │
│ │ SclExportHandler, XmlComparisonService │ │
│ │ HW: HwConfigExportToTia, DeviceExportHelper │ │
│ ├──────────────────────────────────────────────────────┤ │
│ │ Services/Import/ │ │
│ │ Software: BlockImport, TagTableImport, UdtImport, │ │
│ │ WatchTableImport, HmiImport, TagTableXlsx │ │
│ │ HW: HwConfigImport, DeviceItemHelper │ │
│ └──────────────────────────────────────────────────────┘ │
│ │ │
│ Siemens.Engineering.dll (TIA Openness API) │
└─────────────────────────────────────────────────────────────┘
The extension uses electron-edge-js to call the .NET TiaOpennessWrapper.dll in-process from Node.js. The wrapper communicates with TIA Portal via the official Siemens TIA Portal Openness API (Siemens.Engineering assemblies).
Documentation
- TIA Portal Openness API (Siemens) — official Openness API documentation
- Documentation/API/ — XML intellisense files for the Openness API
- Documentation/Schemas/ — SimaticML XSD schemas for all block types
- THIRD_PARTY_NOTICES.md — third-party components and redistribution notes
Third-Party Licensing & Redistribution
- This extension code is released under MIT.
- Third-party notices for npm/NuGet components are listed in THIRD_PARTY_NOTICES.md.
- For Siemens Openness components, use and distribution are subject to Siemens package terms; evaluate those terms for your release scenario.
- Do not bundle or redistribute
Siemens.Engineering.*binaries with this extension unless explicitly allowed by Siemens terms. - End users must provide their own licensed TIA Portal installation and Openness entitlement.
Known Issues & Limitations
- Windows only — TIA Portal and the Openness API are Windows-only
- Know-how protected blocks — cannot be exported; the extension detects and skips placeholder files
- SD format (LAD/FBD) — only supports LAD/FBD and mixed blocks (no protected blocks)
- Large projects — full project import may take several minutes depending on project size
Disclaimer of Liability
The extension is a development and automation tool, and all imports/exports modify engineering data at your own risk.
The author is not liable for any direct or indirect damages, production downtime, data loss, project corruption, safety incidents, or other consequences resulting from changes made to TIA Portal projects using this extension.
Users are fully responsible for validating, testing, and approving all generated or imported changes before deployment to real machines, production lines, or safety-related systems.
Community — Share Your Scripts & Ideas
This extension ships with a Tools/ directory for utility scripts and a copilot-instructions.md file that teaches AI assistants how to work with TIA Portal projects.
We encourage you to contribute! If you have created useful scripts, automation tools, or improvements to the Copilot instructions:
- Fork the TiaImportExport.VSExt repository on GitHub
- Add your scripts to
Tools/(with a matching.mddescription) - Or propose changes to
.github/copilot-instructions.md - Open a Pull Request — your contribution will help the entire TIA Portal + VS Code community
Every shared script or instruction improves the experience for all users. Don't hesitate to share even small utilities — they often save the most time!
License
MIT — Copyright (c) 2026 Mariusz Czyrnek
