Import / Export
The Import / Export view is the heart of the TIA Portal integration. It opens in the Side Bar when you click the TIA Portal icon in the Activity Bar, just below the Project Explorer.
Layout
The Import / Export view stacks top-to-bottom in one Side Bar pane:
┌────────────────────────────────────────────────┐
│ [ Software ] │ [ Export Selected → ] │ ← selection chips (left)
│ [ HMI ] │ [ Export All → ] │ and actions (right)
│ [ Safety ] │ [ ← Import Selected ] │
│ [ Watch/Force ] │ [ ← Import All ] │
│ [ Hardware ] │ │
├────────────────────────────────────────────────┤
│ EXPORT FOLDER │
│ [ C:\…\WorkingDir\… ] [ 📁 ] │
├────────────────────────────────────────────────┤
│ ☑ 📁 Blocks │ ← export-folder tree
│ ☑ 🔒 FB_Drive.xml │
│ ☐ 📁 Datatypes │
│ ☐ 📝 UDT_Motor.xml │
└────────────────────────────────────────────────┘
- Selection chips (left column): Software / HMI / Safety / Watch/Force / Hardware. Click a chip to choose which category you are working with.
- Actions (right column): the buttons for the selected chip (for Software: Export Selected, Export All, Import Selected, Import All). The action set swaps when you pick a different chip. Action buttons are enabled only while a project is connected.
Export Folder
The Export Folder is the folder on your file system where exported files are stored and from which files are imported.
Setting:
- Click the folder button (📁) next to the EXPORT FOLDER path field.
- Select a folder.
- The path is shown in the field; until one is set the field reads
(not set — will prompt on export).
Tip: Use a Git repository folder so you can version-control your exports — open that folder in the Explorer to commit and review changes.
Note: The "Working Directory" in Settings refers to the "Find Unused Blocks" function and is a separate folder.
Export-folder tree
Below the path row, the rest of the pane is a live tree of the configured export folder, filtered to TIA source files (.xml / .scl / .awl / .stl / .db / .udt / .s7dcl) plus folders, sorted folders-first then by name. The tree mirrors the Project Explorer: every row carries a tri-state checkbox and the matching Siemens block/folder icon. The tree refreshes automatically (so files exported via the action buttons appear immediately), and your checked set is preserved across a refresh.
- Tri-state checkbox — checking a folder cascades to every file inside it; a folder with only some descendants checked shows the indeterminate state. The checked set (not the row selection) is what Import Selected acts on.
- Siemens icon — files get the icon for their real block type (FB / FC / OB / DB / UDT / tag table, including Safety variants), folders get the folder icon. A generically-named file such as
Block_2.sclstill shows its true block icon, because the icon is refined from the file's content. A file that cannot be classified shows a neutral file icon. - Open on click — clicking a file row opens it in the editor (single-click preview, double-click pinned, or open to the side); folder rows expand/collapse.
When no export folder is set, the tree area shows an inline placeholder (the chips, action buttons, and path row stay visible):
No export folder selected.
[Select Export Folder]
The view header (top of the pane) has a Refresh button to re-read the folder and a Reveal in File Explorer button, both shown only while an export folder is set.
Right-click on Folders and Files (export-folder tree)
Right-clicking a row in the export-folder tree opens an explorer-style context menu that acts on the focused / selected rows:
- Open / Open to the Side — open the file in the editor (hidden on folder rows).
- Reveal in File Explorer — show the row's file or folder in the OS file explorer.
- New File… / New Folder… — create inside the focused folder (or the export root). The name is validated against empty names, path separators, and collisions.
- Rename… — input box pre-filled with the current name, with the same collision validation.
- Delete — confirms first; when the OS trash is available the dialog offers "Move to Trash", otherwise it warns about a permanent delete. Removing a folder removes its contents recursively.
- Cut / Copy / Paste — Paste is disabled until something is cut or copied; name collisions get incremental suffixes ("… copy", "… copy 2").
- Copy Path — copies the row's full filesystem path to the clipboard.
Any editors open on affected files follow renames, moves, and deletes. These file operations are not undoable.
Export Operations
Export Selected
- Check the boxes next to the desired blocks in the Project Explorer.
- Click Export Selected.
- The selected items are exported as XML. Existing files with the same name are overwritten; all other files in the export folder are kept.
- As a shortcut, you can drag blocks, data types, tag tables, or technology objects directly from the Project Explorer onto the export-folder tree — this exports them the same way as selecting them and clicking Export Selected. Dragged folders or PLC nodes contribute every exportable block under them.
Export All
- Click Export All.
- ALL blocks, data types, tag tables, technology objects, and software units from the connected PLC are exported — a full project export. Existing files with the same name are overwritten; any other files already in the export folder are kept.
Import Operations
Import Selected
- Check the boxes next to the desired files in the export-folder tree.
- Click Import Selected.
- The checked files are imported (no file picker). Existing blocks with the same name are overwritten; all other PLC content is left untouched.
Import All
- Click Import All.
- The entire PLC program is cleared first (all blocks, data types, and tag tables are deleted), then all importable files for the chosen PLC are imported — a full project re-import. If the export folder contains a sub-folder named after the chosen PLC (the layout Export All creates), exactly that sub-folder is imported; otherwise the export folder itself is used. A warning dialog shows the file counts and requires confirmation.
Important: Import All replaces the complete PLC content with what is in the imported folder. Items marked as protected with the red lock — folders, tag tables, and data types as well as blocks — are neither deleted nor overwritten (and neither is any block that is know-how-protected on the PLC). If the import cannot be applied it is rolled back and the PLC is left unchanged; the notification names the cause and offers a Show Details button that opens the log.
You can also import by dragging file or folder rows from the export-folder tree onto a PLC node — or its Program blocks / PLC data types / PLC tags folder — in the Project Explorer. Dropping anywhere else warns you. Dropping external files from the OS onto a PLC node (or one of those folders) also starts an import.
Progress and cancellation
While an export or import runs, a progress footer appears between the path row and the tree, showing the operation name, a current/total count, a live stopwatch (minutes:seconds, switching to hours when a run takes that long), the current item, and a Cancel button. The same progress also shows in the Status Bar at the bottom of the window — click it to cancel.
When the operation ends, the footer keeps showing its name and total duration until the next operation starts, so you can always see how long the last run took.
Exports run a few preparation steps after the last exported item; the footer shows them (for example "Preparing files for version control (i/N)"). If you cancel during this phase, a warning tells you how many files were left unprepared — run the export again to complete it.
For Import All, a notification additionally appears at the bottom right, showing each step live (including the preparation) and offering its own Cancel button.
Import / Export Settings
These options customize import and export behavior. Open them in Settings (Ctrl+,) and search for tiaPortal, or in Settings → Extensions → TIA Portal:
Import Options:
| Option | Description |
|---|---|
| Ignore Structural Changes | Ignores structure modifications when importing |
| Ignore Missing References | Continues import even if referenced objects are missing |
| Fault Tolerant | Continues past recoverable per-block errors |
| Compile After Import | Compiles the PLC once the import finishes |
| Save After Import | Saves the project once the import finishes |
Export Options:
| Option | Description |
|---|---|
| Include Defaults | Includes default values in the exported XML |
| Insert Timestamp | Inserts an export timestamp into the exported XML document info. Disable for clean version-control diffs. |
| XML Only | Exports only the XML representation, without the editable source file. Leave it off to also get the readable source file — this applies to both blocks and data types. |
| Export Protected Files | When unchecked, items marked as protected (red lock) are excluded from export; folder structure is always preserved. |
These options help resolve common import issues and customize export behavior for version control. Changes take effect on the next refresh — no reload required.
Data types as editable source files
By default — when XML Only is left off — exporting data types gives you a readable source file alongside the XML, just like blocks. You can open these source files in the editor, change them, and import them back into a project.
Data types that build on other data types are exported the same way and can be imported back as well. Turn on XML Only if you only want the XML representation.
S7DCL Export (TIA Portal V20+ only):
S7DCL (SIMATIC source documents) is an additional text-based export alongside the standard XML and source-code files (it appears as .s7dcl files in the export folder). It can be enabled per source language (SCL, STL/AWL, LAD/FBD). It is ideal for code review and diff comparison in Git/SVN, and for LAD/FBD blocks it provides a text representation that would otherwise not exist.
S7DCL Import (TIA Portal V20+ only):
.s7dcl files can also be imported back into the project — through every selective import path: check them in the export-folder tree and click Import Selected, drag them (or their folder) onto a PLC in the Project Explorer, pick them in the import file dialog, or drop them from the Windows Explorer.
- If the same block is also present as a
.scl,.awl, or.xmlfile in the same import selection, that file is used and the.s7dclis skipped — the result notification lists the skipped files. A.s7dclis therefore imported exactly when it is the only representation of that block in your selection. - Import All deliberately leaves
.s7dclfiles out, because the regular export files next to them carry the same content. To import a standalone.s7dcl, use one of the selective import paths above. - If a
.s7resfile with the same name sits next to the.s7dcl, its comments and texts are imported along automatically — keep the two files together when copying or renaming.
Important Notes:
- S7DCL is an additional export, not a replacement — you always get the standard formats.
- S7DCL export and import require TIA Portal V20 or higher; on an older version the import reports the affected
.s7dclfiles as failed with a clear message.
HMI Export/Import
For projects with HMI devices (WinCC Unified, Comfort Panels, etc.), click the HMI selection chip, then use the actions in the right column:
Export HMI Selected:
- Tick HMI elements in the Project Explorer (under the HMI device node).
- Click Export HMI Selected.
- Choose the HMI device if the project has more than one.
- The ticked screens, templates, tags, and scripts are exported into a subfolder named after the device in your export folder.
Export HMI All:
- Click Export HMI All.
- Choose the HMI device if the project has more than one.
- All elements of that HMI device are exported into your export folder.
Supported HMI Elements:
- Screens and Popups
- Screen Templates
- HMI Tag Tables
- VB Scripts
- Connections
- Text Lists
- Graphic Lists
WinCC Unified Screen Export/Import
WinCC Unified screens are exported as JSON files (not XML like Classic HMI). The export includes all screen items with their properties, positions, colors, fonts, texts, compositions (e.g., ListBox entries), dynamizations, and events.
- Export Selected: Select screens in the HMI tree, click Export HMI Selected.
- Export All: Click Export HMI All, choose the device — exports all screens of that device preserving the folder structure (e.g.,
Screens/Device PopUp/DCM.json). - Import: Check the JSON files in the export-folder tree, click Import HMI Selected. Existing screens with the same name are deleted and recreated.
Note: For WinCC Unified screens, all elements will be placed in Layer 0 after import. The Siemens TIA Portal Openness API does not support reading or writing layer assignments. Positions and all other properties are preserved correctly.
Safety
For safety programs, click the Safety selection chip, then use the action in the right column:
- Export F-Signatures → — exports the F-signatures of the safety program into the configured export folder.
Watch/Force
Click the Watch/Force selection chip to export and import watch and force tables. The right column offers:
- Export Watch Tables — exports the project's watch tables into the export folder.
- Export Force Tables — exports the project's force tables into the export folder.
- Import Tables… — brings exported watch and force tables back into the project.
Software-Unit metadata round-trip
Software Units appear in the Project Explorer with their namespace shown next to the name (for example Unit_1 [A]), while the bare name is kept for every operation. When you export and later re-import a Software Unit, its namespace, author, and comment are preserved across the round-trip.
Hardware Export
Export the device configuration as an AutomationML (.aml) file:
- Click the Hardware selection chip.
- Click Export AML → in the right column. The file is written into the configured export folder.
- Use ← Import AML in the same column to bring an
.amlfile back into the project.
Note: AML export covers the full hardware configuration of the selected PLC. The resulting .aml file can be re-imported or kept for documentation.