0

I am busy with a C script in Siemens WinCC. I would like to open a faceplate on in which I can open other faceplates. Howerver, I would like to use the Tagprefix from the first faceplate in the second. Does anybody have an idea how I can give the tag prefix through?

Thanks in advance! Tom

  • Welcome to SO! What have you tried so far? To help us help you, please add a [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) – abpatil Jun 12 '17 at 09:58

1 Answers1

0

As You know, the tag prefix is a property of the screen window. You need to provide that data to the script running in the context of the picture inside the picture window from the parent screen window.

One solution is by using a text field "tagname" in the "faceplate" and use that as a source of the tag-prefix name. The tag-prefix can be transferred by a simple vbs script that runs "on open".

Use VBS "Item.parent.TagPrefix" and then give the result to the text field.

Or just from a button in the picture "Item.parent.parent.TagPrefix" is also ok.

The same in C would use the functions "GetParentPictureWindow", and return a string(lpsz) containing the name of the picture window. This name can be used to read the property of the object with this name using "GetPropChar" using "Tagprefix" as the property.

//PerD