Example:
The picture "InputOutput" is to be displayed in the picture window. The picture "InputOutput"
contains three I/O fields which are linked to a structure tag. The structure tag consists of the
elements EA1, EA2, EA3; one element each for each I/O field.
Three such structure tags have been define in the project, with structure names Struct1, Struct2
and Struct3.
The tag prefix is in this case the structure name followed by a period. Specify the tag prefix
as,
say, Struct2. (the period is necessary in order to address the elements of the structure tag
as structure elements in a syntactically correct way). The I/O fields in the picture "InputOutput"
are then linked to the elements in structure tag Struct2:
Tag Prefix: "Struct2."
● Output value (first I/O field): EA1
● Output value (second I/O field): EA2
● Output value (third I/O field): EA3
The current tag connection in the picture window is then
● Output value (first I/O field): Struct2.EA1
● Output value (second I/O field): Struct2.EA2
● Output value (third I/O field): Struct2.EA3
Example:
The "PictureWindowConfig" procedure accesses the properties of the picture window. In this
example the picture window will be configured:
Sub PictureWindowConfig()
'VBA739
Dim objPicWindow As HMIPictureWindow
Set objPicWindow = ActiveDocument.HMIObjects.AddHMIObject("PicWindow1", "HMIPictureWindow")
With objPicWindow
.AdaptPicture = False
.AdaptSize = False
.Caption = True
.CaptionText = "Picturewindow in runtime"
.OffsetLeft = 5
.OffsetTop = 10
'Replace the picturename "Test.PDL" with the name of
'an existing document from your "GraCS"-Folder of your active project
.PictureName = "Test.PDL"
.ScrollBars = True
.ServerPrefix = "my_Server::"
.TagPrefix = "Struct."
.UpdateCycle = 5
.Zoom = 100
End With
End Sub
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
System Manual, 11/2008,
2305