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:

- Selection chips (left column): Software / HMI / Safety / Watch/Force / Hardware / Library. 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 / .json) 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.
- Filter β click the filter icon (funnel) at the top of the view, or press Ctrl+Alt+F (or F3) with the tree focused. Type part of a name β the tree narrows to the matching files and folders together with their parent folders, exactly like the Project Explorer filter. Click the icon again (or press Esc) to close it and restore the tree's previous state.
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 Filter button to search the tree, a Refresh button to re-read the folder and a Reveal in File Explorer button, all 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
Before every export β whether Export Selected, Export All, or a drag from the Project Explorer β the connected PLC is compiled first, so the exported files reflect a built project. If compilation reports errors, the export still runs.
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.
Blocks with a source file, F-blocks as XML only
Standard blocks written in SCL or STL get an editable source file (.scl or .awl) next to the XML, which you can open in the editor, change, and import back. Blocks of the safety program (F-blocks, yellow icon in the Project Explorer) are exported as XML only, because TIA Portal does not generate a source file for them.
Whether a block belongs to the safety program follows from its programming language in TIA Portal (F-FBD, F-LAD, F-DB and so on), not from its name. A standard SCL function named F_Motor, for example, exports like any other standard block, with XML plus .scl source file, and shows the regular block icon.
Import Operations
After every successful import β whether Import Selected, Import All, or a drag onto the Project Explorer β the PLC is compiled, so it is ready to use right away. If compilation reports errors, the import still completes.
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.
Duplicate names: If the imported folder contains the same data type or block twice (twice as a source file, or twice as XML in different locations), the import cannot be applied, because each name may exist only once in TIA Portal. Import All checks for this before any change, stops immediately, and names the affected item and both locations in the message β rename or remove one of the two files and run it again. The normal export pairing of an XML and the matching source file for the same item does not count as a duplicate.
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 the AnyAutomation Settings editor (Ctrl+, or via the gear/menu) and go to the Import/Export Settings category:
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 Import | Continues past recoverable per-block errors |
| Prefer .udt over .xml | When a data type is in the import folder as both a .udt source and an .xml file, Import All imports the .udt and skips the .xml. Turn it off to import the .xml and skip the .udt. If only one of the two is present, that one is imported either way. |
Export Options:
| Option | Description |
|---|---|
| Program Blocks | Which default values are included when exporting blocks: None / With Defaults / With Read-Only. |
| Data Types | As above, for data types. |
| Tags | As above, for tag tables. |
| Technology Objects | As above, for technology objects. |
| HMI | As above, for HMI content. |
| Export Protected Files | When unchecked, items marked as protected (red lock) are excluded from export; folder structure is always preserved. |
| Data Types as .udt Source | When on, data types also export as an editable .udt source file next to the XML. Turn it off to export data types as XML only. Has no effect while XML Only is on. |
Version Control (export optimization):
| Option | Description |
|---|---|
| Exclude Document Info (recommended) | Removes the volatile document info (including the export timestamp) from the exported XML β for clean version-control diffs. |
| Normalize Timestamps | Normalizes timestamps in the exported XML. |
| Clear Installed Products | Removes the installed-products list from the exported XML. |
| Remove Object List | Removes the object list from the exported XML. |
| Normalize Whitespace | Normalizes whitespace in the exported XML. |
These options help resolve common import issues and customize export behavior for version control. Changes take effect on the next refresh β no reload required.
Note: XML Only (XML representation only, without the editable source file) is not a control in the settings editor β it is available only as the configuration key
tiaPortal.export.xmlOnly.
Data types as editable source files
By default, exporting data types gives you a readable source file (.udt) 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. To export data types as XML only, turn off Data Types as .udt Source in the export options (or turn on XML Only, which drops the source file for blocks and data types alike).
When you run Import All on a folder that holds a data type as both a .udt and an XML, Prefer .udt over .xml in the import options decides which one is used: on imports the .udt, off imports the XML, and the other is skipped. If only one of the two is in the folder, that one is imported either way.
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 Filesβ¦. 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.
Export OPC UA Nodes
Export a CPU's OPC UA server interface as a single XML file:
- Right-click the CPU in the Project Explorer and choose Export OPC UA Nodes from the Export submenu (also available from the Command Palette as Openness Manager: Export OPC UA Nodes).
- If no export folder is configured yet, a folder picker appears, so you can choose where to write the file.
- Studio writes the CPU's OPC UA server interface to a single XML file named after the CPU, into the export folder. It is the same XML the CPU's OPC UA export button produces in TIA Portal: it contains all tags and DB variables the CPU exposes to OPC UA.
Progress is shown while the export runs; on success you can open the folder straight from the notification. Hand the resulting XML to any OPC UA client to configure it offline.
Note: The CPU must be offline. If it is online, you get a clear message to go offline first. The whole CPU interface is always exported as one file; there is no per-tag or per-DB selection.
Library
Click the Library selection chip to export Project Library types as XML files. The right column offers:
- Export Selected β β exports the library type selected in the Project Explorer; if a library folder is selected, every type beneath it is exported.
- Export All β β exports every type in the Project Library.
The types are written as XML into a Library subfolder of your export folder, mirroring the library's folder structure; the latest version of each type is exported. As a shortcut, you can also drag library types β or a whole Types folder β straight from the Project Explorer onto the export-folder tree; they export the same way.
Note: Master Copies are not included β they cannot be exported directly to a file. For more about the library, see Library Management.