
Example:
The "HMI3DBarGraphConfiguration()" procedure accesses the properties of the 3DBarGraph
object. In this example, limit 2 will be monitored:
Sub HMI3DBarGraphConfiguration()
'VBA560
Dim obj3DBar As HMI3DBarGraph
Set obj3DBar = ActiveDocument.HMIObjects.AddHMIObject("3DBar1", "HMI3DBarGraph")
With obj3DBar
.Layer02Checked = True
End With
End Sub
See also
Layer02Value Property (Page 2167)
Layer02Color Property (Page 2166)
3DBarGraph Object (Page 1805)
Layer02Color Property
Description
Defines or returns the color for limit 2 of the 3DBarGraph object. LONG write-read access.
When monitoring of the limit value is activated (Layer02Checked property), the bar turns to
the color defined by this attribute on reaching the limit value.
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 "HMI3DBarGraphConfiguration()" procedure accesses the properties of the 3DBarGraph
object. In this example the color for limit 2 will be defined as "Magenta":
Sub HMI3DBarGraphConfiguration()
'VBA561
Dim obj3DBar As HMI3DBarGraph
Set obj3DBar = ActiveDocument.HMIObjects.AddHMIObject("3DBar1", "HMI3DBarGraph")
With obj3DBar
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
2166
System Manual, 11/2008,