Example:
The "LayerInfo()" procedure outputs the name and zoom configuration for each layer of the
current picture:
Sub LayerInfo()
'VBA620
Dim colLayers As HMILayers
Dim objSingleLayer As HMILayer
Dim iAnswer As Integer
Set colLayers = ActiveDocument.Layers
For Each objSingleLayer In colLayers
With objSingleLayer
iAnswer = MsgBox("Layername: " & .Name & vbCrLf & "Min. zoom: " & .MinZoom & vbCrLf & "Max.
zoom: " & .MaxZoom, vbOKCancel)
End With
If vbCancel = iAnswer Then Exit For
Next objSingleLayer
End Sub
See also
Layer Object (Page 1894)
Editing Layers with VBA (Page 1603)
MCGUBackColorOff-Eigenschaft
Description
In the case of the GroupDisplay object, defines or returns the background color for the "Went
Out Unacknowledged" status when the flash status is "Off". LONG write-read access.
Determination of Color Value
The color is displayed in RGB format (Red, Green, Blue). Specify the corresponding decimal
value for each of the three RGB values (value range from 0 to 255).
Use VBA function "RGB" to assign a color to a property. The color "red", for example, is
represented as follows: RGB(255, 0, 0)
Example:
The "GroupDisplayConfiguration()" procedure accesses the properties of the Group Display.
In this example the background color when the flash status is "Off" will be set to "Red":
Sub GroupDisplayConfiguration()
'VBA621
Dim objGroupDisplay As HMIGroupDisplay
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
System Manual, 11/2008,
2209