IMDTouchKnowledge BaseShop main store

Explainer

Why WinCC Unified screens have no Openness export method

HMI and touchscreens Published 8 min read

Short answer

In TIA Portal Openness V17 a WinCC Unified Comfort screen is the type Siemens.Engineering.HmiUnified.UI.Screens.HmiScreen, and that type exposes no Export(FileInfo, ExportOptions) method — there is no screen-XML export or reimport. The supported path is to edit the Unified device's engineering objects directly through the object model; a FileInfo plus a success message writes no file.

On this page
  1. Why does Screen.Export work for classic HMI screens but not for WinCC Unified?
  2. Which Openness type represents a Unified Comfort screen in V17?
  3. Is there a supported way to export a Unified screen to XML in V17?
  4. Why does my Unified handler print success but write no XML file?
  5. Example: what does the handler produce for 5 selected Unified screens?
  6. How do you edit Unified screens through Openness instead?
  7. Can the Excel Importer/Exporter handle bulk Unified screen work?
  8. How do you test a Unified Openness change safely?
  9. Questions asked

In TIA Portal Openness V17, a WinCC Unified Comfort screen is correctly represented by Siemens.Engineering.HmiUnified.UI.Screens.HmiScreen — your property is the right type. What the type does not have is the classic Export(FileInfo, ExportOptions) method, so there is no supported screen-XML export or reimport for Unified screens in V17. The supported path is to connect to the Unified device in the open project and edit its engineering objects directly; the Excel Importer/Exporter for WinCC Unified covers bulk screen work through the same interface. A FileInfo and a success message export nothing: constructing FileInfo describes a path, and the commented-out call cannot be uncommented because the member does not exist. This article separates what the V17 API declares, what your handler actually does, and the edit-in-project workflow that replaces the XML round-trip.

Why does Screen.Export work for classic HMI screens but not for WinCC Unified? #

Because the two screen families are different object types: the classic method belongs to Siemens.Engineering.Hmi.Screen.Screen, while a Unified Comfort screen is Siemens.Engineering.HmiUnified.UI.Screens.HmiScreen, and in Openness V17 that Unified type exposes no Export(FileInfo, ExportOptions) method at all.

Openness is the engineering API for automating TIA Portal project work. Its object model exposes each engineering object together with the operations that object actually declares, and a shared purpose — both families represent an HMI screen — does not require two product families to expose identical methods or file formats. The classic XML export workflow is documented down to program code for exporting every screen of a device; no equivalent screen-export workflow is documented for Unified in V17.

Engineering target Screen type in V17 Screen export member Supported screen workflow in V17
Classic HMI screen Siemens.Engineering.Hmi.Screen.Screen Export(FileInfo, ExportOptions) XML export, edit, reimport
Unified Comfort screen Siemens.Engineering.HmiUnified.UI.Screens.HmiScreen None declared Edit the device's objects directly

Changing ExportOptions.WithDefaults to ExportOptions.None, picking another destination folder, or adding exception handlers cannot create an operation the selected type does not declare, and casting a Unified screen to the classic screen type is not a bridge — the two types are unrelated classes in different namespaces.

Which Openness type represents a Unified Comfort screen in V17? #

In TIA Portal V17 the screen you selected is correctly typed as Siemens.Engineering.HmiUnified.UI.Screens.HmiScreen, so your property assignment is right; what fails is the operation you expect from it, because that type's member list contains no screen-export method.

That type lives in the HmiUnified namespace tree, separate from the classic HMI tree, and the split is deliberate: Unified screens are project objects to edit, not files to round-trip. Your WPF plumbing is not the problem. A selection property that stores the screen and raises NotifyPropertyChanged is doing its job — updating bound controls; Windows Presentation Foundation supplies user-interface behavior and decides nothing about which engineering operations Openness supports. Verify the typing instead of assuming it: with the project open, inspect the declared type of the selected screen in your development environment. The Unified Comfort selection resolves to the HmiUnified screen type, and scanning that type's members shows properties and child collections but no Export member. Once the type is confirmed, the missing method stops being a bug hunt and becomes a design decision.

Is there a supported way to export a Unified screen to XML in V17? #

No — in V17 there is no Openness call that exports a WinCC Unified screen to XML or reimports one, so every supported change happens directly on the Unified device's engineering objects inside the project.

The boundary is specific: it is the screen-export operation on the Unified screen type in V17, not a statement about every Openness operation or every release. Within that boundary there is no per-screen export member, no documented counterpart to the classic all-screens example, and therefore no XML round-trip to debug — nothing exports, so nothing reimports. The decision follows: in V17, plan Unified screen automation around direct project edits from the first line of code, and treat any per-screen XML file a Unified branch of your tool produces as invented output, not an export.

Why does my Unified handler print success but write no XML file? #

Because the handler builds a FileInfo, never calls any export — the call is commented out because no member exists to call — and then prints Exported HMI Screen unconditionally, so the message reports an operation that never ran.

Constructing FileInfo creates an in-memory description of a path; it creates no file and touches no directory. The console line after it runs every time a screen is selected, announcing success for a file that was never written. Report completion only after an operation whose result you have checked — here there is no such operation, so the success line has to go or be gated on a real result.

Selection handling hides a second trap. The outer condition skips the entire try block when no screen is selected, so the inner NullReferenceException handler can never report a missing selection — the null case never reaches the try. Give that case its own explicit outcome outside the try, and show the selected device beside the screen name, because a screen name alone is ambiguous in a tool that can navigate several HMI devices.

  • Remove the unconditional success line, or gate it on a checked operation result.
  • Handle a null selection outside the try, with its own message.
  • Display device and screen together in the selection interface.

Example: what does the handler produce for 5 selected Unified screens? #

For an illustrative run over 5 selected Unified screens, the handler constructs 5 FileInfo objects, executes 0 export calls because the Unified screen type declares none, prints 5 success lines, and leaves the destination folder at 0 XML files — an overcount of 5 - 0 = 5 claimed exports.

// Illustrative trace. screenCount is my test input; the zero member count is documented:
// V17 HmiScreen declares no Export(FileInfo, ExportOptions).
int screenCount = 5;                 // illustrative selection: Screen_1 through Screen_5
int exportMembersDeclared = 0;       // documented V17 fact
int fileInfosBuilt = screenCount;    // 5, one FileInfo per selected screen
int exportCallsMade = fileInfosBuilt * exportMembersDeclared;   // 5 * 0 = 0
int successLinesPrinted = screenCount;                          // 5, one message per screen
int xmlFilesWritten = exportCallsMade;                          // 0
// Reported minus actually written: 5 - 0 = 5 phantom exports

The test that proves it: point the export folder at an empty directory, select each of the 5 screens in turn, and run the handler. The directory listing holds 0 .xml files before and after, while the console prints 5 Exported HMI Screen lines. That discrepancy is the evidence that the message is decorative; delete it or gate it on a result you checked.

How do you edit Unified screens through Openness instead? #

You get a handle to the Unified device in the open project and edit its engineering objects through their properties and child collections, and the edits appear in the TIA Portal editor while your application is still running.

Openness reaches only the devices the open project contains, so create or select the right Unified station before any code runs; the walkthrough on selecting a WinCC Unified PC target in TIA Portal covers that choice for PC targets. Then acquire the Unified device and work through its child collections — a child collection is the set of engineering objects another object owns, such as the items a screen contains. The exact screen, screen-item and tag members are the ones the V17 Openness documentation lists under the HmiUnified namespaces; the classic export sample supplies neither those members nor a Unified XML schema, so work from the documentation installed with TIA Portal rather than adapting the classic example.

This is an architecture change, not a namespace swap. The classic workflow edits a separate XML document and imports the result later; the Unified workflow modifies the project itself, and you can watch the edits land — tags appear in the editor's lists and items appear on the screen while your application runs. No reimport step corresponds to a direct edit, and saving the project is what makes the change persist, so the artifact you version is the project, not per-screen files. These are the same screens you otherwise configure for runtime behavior such as changing the HMI screen from the PLC in WinCC Unified.

Can the Excel Importer/Exporter handle bulk Unified screen work? #

Yes — the Excel Importer/Exporter for WinCC Unified connects through the same Openness interface and creates HMI screen objects from spreadsheet data and exports screen object data back to spreadsheets, which covers bulk screen work without any hand-written XML.

That makes it the supported bulk path: build screens in a spreadsheet, let the tool write them into the project, and export existing screen objects back out for review. It drives the project the way your own Openness code does, so it hands you spreadsheets, not per-screen XML files to diff. Check the tool's release against your TIA Portal release before relying on it, and split the work the same way the code path splits: object-model edits for in-tool changes, spreadsheets for bulk creation and review.

How do you test a Unified Openness change safely? #

Run it against a copy of the project on an offline engineering station, verify the selected device and screen in your own user interface before the first edit, and save the copy — never the production file — until the change is proven.

A direct edit leaves no XML file to fall back on, so the first controlled change belongs on a project copy, proven in the editor and in the tool's error paths before it touches production work. Deployment is not an obstacle: from V17, Siemens reworked Openness for long-term stability, and a V17 Openness application runs on any engineering computer that has TIA Portal V17 installed, so the bench machine and the production engineering station run the same build.

The decision, case by case:

  • Classic HMI screen: keep the documented XML export-edit-reimport workflow.
  • Unified Comfort screen in V17: no export exists; edit the device's objects through the HmiUnified namespaces, and use the Excel Importer/Exporter for bulk screen creation or review.
  • Later TIA Portal release: check that release's Openness documentation before assuming either behavior.

Questions asked

What happens if I uncomment the classic export call against a Unified screen?

The call stops compiling before it ever runs: Export(FileInfo, ExportOptions) is declared on the classic screen type, so the compiler rejects it as a missing member on the Unified screen type. You never reach a runtime state where ExportOptions.None, a different folder, or an extra exception handler could help — there is no operation to configure.

Can one tool serve classic panels and Unified devices without forking completely?

Yes, behind an interface. Keep selection, logging and project handling shared, and split only the screen operation: a classic branch that calls the XML export and a Unified branch that edits the device's objects directly. Exporting a Unified device then becomes acquiring its handle in the project, and the application code never needs to know which hardware family is connected.

Does the documented bulk screen export cover screens organized in folders?

For classic HMI only, and with separate program code: the Openness documentation provides one program example for exporting all screens of an HMI device and another for exporting the aggregated screens of all user-defined screen folders. Neither example has a V17 counterpart for a Unified device, which is why bulk Unified screen work moves to the object model or the Excel Importer/Exporter.

Is there a documented XML schema for Unified screens in V17?

No. With no export member on the Unified screen type, V17 documents no per-screen XML schema for Unified screens either; the XML attributes described in the Openness documentation belong to classic HMI and PLC data. If you need a reviewable file of screen content, the spreadsheets the Excel Importer/Exporter produces are the closest supported artifact.

Keep reading

  • How-to

    Change the HMI screen from the PLC in WinCC Unified

    In WinCC Unified the Job Mailbox is gone. Give each target screen a screen number, link an HMI tag to the PLC integer command tag, and call ChangeScreenWithNumber from a value-change event on an object in a persistent base screen. Never call the UI system functions from a scheduled task or global module — those scopes have no UI context and raise "UI not supported in current scope".

    HMI and touchscreens

  • Troubleshooting

    Why WinCC Runtime Advanced Has No Screens Folder

    The Screens folder is missing because the installed engineering edition cannot configure a WinCC Runtime Advanced PC station: WinCC Basic covers panels only. Install WinCC Advanced or Professional, license it, add the PC station in a new clean project, and the tool generates the folder. The proxy-device message is a later check, and reinstalling TIA Portal does not fix it.

    HMI and touchscreens

  • How-to

    How to Build Two-Level Tab Navigation With Child Screens in WinCC

    Build two-level navigation in WinCC with one persistent main picture, a picture window for content, and visibility-controlled child menus. Each main-tab press must set three things at once: the tab's own selected state, the matching child menu, and the initial child picture. A graphics group only bundles objects in the editor and creates no runtime navigation.

    HMI and touchscreens