Назад
Example:
The "RectangleConfiguration()" procedure accesses the properties of the rectangle. In this
example the Rectangle object will be inserted in layer "4":
Sub RectangleConfiguration()
'VBA553
Dim objRectangle As HMIRectangle
Set objRectangle = ActiveDocument.HMIObjects.AddHMIObject("Rectangle1", "HMIRectangle")
With objRectangle
.Layer = 4
End With
End Sub
See also
HMIObject Object (Page 1882)
Editing Layers with VBA (Page 1603)
Layer00Checked Property
Description
TRUE if limit 0 is to be monitored in the case of the 3DBarGraph object. BOOLEAN write-read
access.
Limit value and representation are defined with the Layer00Value and Layer00Color
properties.
Example:
The "HMI3DBarGraphConfiguration()" procedure accesses the properties of the 3DBarGraph
object. In this example, limit 0 will be monitored:
Sub HMI3DBarGraphConfiguration()
'VBA554
Dim obj3DBar As HMI3DBarGraph
Set obj3DBar = ActiveDocument.HMIObjects.AddHMIObject("3DBar1", "HMI3DBarGraph")
With obj3DBar
.Layer00Checked = True
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,
2161
See also
Layer00Value Property (Page 2163)
Layer00Color Property (Page 2162)
3DBarGraph Object (Page 1805)
Layer00Color Property
Description
Defines or returns the color for limit 0 of the 3DBarGraph object. LONG write-read access.
When monitoring of the limit value is activated (Layer00Checked 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 0 will be defined as "Magenta":
Sub HMI3DBarGraphConfiguration()
'VBA555
Dim obj3DBar As HMI3DBarGraph
Set obj3DBar = ActiveDocument.HMIObjects.AddHMIObject("3DBar1", "HMI3DBarGraph")
With obj3DBar
.Layer00Checked = True
.Layer00Color = RGB(255, 0, 255)
End With
End Sub
See also
Layer00Checked Property (Page 2161)
3DBarGraph Object (Page 1805)
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
2162
System Manual, 11/2008,
Layer00Value Property
Description
Defines or returns the value for "limit 0" in the case of the 3DBarGraph object.
Monitoring only takes effect when the Layer00Checked property value is set to TRUE.
Example:
The "HMI3DBarGraphConfiguration()" procedure accesses the properties of the 3DBarGraph
object. In this example the value for limit 0 will be defined as "0":
Sub HMI3DBarGraphConfiguration()
'VBA556
Dim obj3DBar As HMI3DBarGraph
Set obj3DBar = ActiveDocument.HMIObjects.AddHMIObject("3DBar1", "HMI3DBarGraph")
With obj3DBar
.Layer00Checked = True
.Layer00Value = 0
End With
End Sub
See also
Layer00Checked Property (Page 2161)
3DBarGraph Object (Page 1805)
Layer01Checked Property
Description
TRUE if limit 1 is to be monitored in the case of the 3DBarGraph object. BOOLEAN write-read
access.
Limit value and representation are defined with the Layer01Value and Layer01Color
properties.
Example:
The "HMI3DBarGraphConfiguration()" procedure accesses the properties of the 3DBarGraph
object. In this example, limit 1 will be monitored:
Sub HMI3DBarGraphConfiguration()
'VBA557
Dim obj3DBar As HMI3DBarGraph
Set obj3DBar = ActiveDocument.HMIObjects.AddHMIObject("3DBar1", "HMI3DBarGraph")
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
System Manual, 11/2008,
2163
With obj3DBar
.Layer01Checked = True
End With
End Sub
See also
Layer01Value Property (Page 2165)
Layer01Color Property (Page 2164)
3DBarGraph Object (Page 1805)
Layer01Color Property
Description
Defines or returns the color for limit 1 of the 3DBarGraph object. LONG write-read access.
When monitoring of the limit value is activated (Layer01Checked 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 1 will be defined as "Magenta":
Sub HMI3DBarGraphConfiguration()
'VBA558
Dim obj3DBar As HMI3DBarGraph
Set obj3DBar = ActiveDocument.HMIObjects.AddHMIObject("3DBar1", "HMI3DBarGraph")
With obj3DBar
.Layer01Checked = True
.Layer01Color = RGB(255, 0, 255)
End With
End Sub
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
2164
System Manual, 11/2008,
See also
Layer01Checked Property (Page 2163)
3DBarGraph Object (Page 1805)
Layer01Value Property
Description
Defines or returns the value for "limit 1" in the case of the 3DBarGraph object.
Monitoring only takes effect when the Layer01Checked property value is set to TRUE.
Example:
The "HMI3DBarGraphConfiguration()" procedure accesses the properties of the 3DBarGraph
object. In this example the value for limit 1 will be defined as "10":
Sub HMI3DBarGraphConfiguration()
'VBA559
Dim obj3DBar As HMI3DBarGraph
Set obj3DBar = ActiveDocument.HMIObjects.AddHMIObject("3DBar1", "HMI3DBarGraph")
With obj3DBar
.Layer01Checked = True
.Layer01Value = 10
End With
End Sub
See also
Layer01Checked Property (Page 2163)
3DBarGraph Object (Page 1805)
Layer02Checked Property
Description
TRUE if limit 2 is to be monitored in the case of the 3DBarGraph object. BOOLEAN write-read
access.
Limit value and representation are defined with the Layer02Value and Layer02Color
properties.
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
System Manual, 11/2008,
2165
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,
.Layer02Checked = True
.Layer02Color = RGB(255, 0, 255)
End With
End Sub
See also
Layer02Checked Property (Page 2165)
3DBarGraph Object (Page 1805)
Layer02Value Property
Description
Defines or returns the value for "limit 2" in the case of the 3DBarGraph object.
Monitoring only takes effect when the Layer02Checked property value is set to TRUE.
Example:
The "HMI3DBarGraphConfiguration()" procedure accesses the properties of the 3DBarGraph
object. In this example the value for limit 2 will be defined as "20":
Sub HMI3DBarGraphConfiguration()
'VBA562
Dim obj3DBar As HMI3DBarGraph
Set obj3DBar = ActiveDocument.HMIObjects.AddHMIObject("3DBar1", "HMI3DBarGraph")
With obj3DBar
.Layer02Checked = True
.Layer02Value = 0
End With
End Sub
See also
Layer02Checked Property (Page 2165)
3DBarGraph Object (Page 1805)
Layer03Checked Property
Description
TRUE if limit 3 is to be monitored in the case of the 3DBarGraph object. BOOLEAN write-read
access.
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
System Manual, 11/2008,
2167
Limit value and representation are defined with the Layer03Value and Layer03Color
properties.
Example:
The "HMI3DBarGraphConfiguration()" procedure accesses the properties of the 3DBarGraph
object. In this example, limit 3 will be monitored:
Sub HMI3DBarGraphConfiguration()
'VBA563
Dim obj3DBar As HMI3DBarGraph
Set obj3DBar = ActiveDocument.HMIObjects.AddHMIObject("3DBar1", "HMI3DBarGraph")
With obj3DBar
.Layer03Checked = True
End With
End Sub
See also
Layer03Value Property (Page 2169)
Layer03Color Property (Page 2168)
3DBarGraph Object (Page 1805)
Layer03Color Property
Description
Defines or returns the color for limit 3 of the 3DBarGraph object. LONG write-read access.
When monitoring of the limit value is activated (Layer03Checked 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 3 will be defined as "Magenta":
Sub HMI3DBarGraphConfiguration()
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
2168
System Manual, 11/2008,
'VBA564
Dim obj3DBar As HMI3DBarGraph
Set obj3DBar = ActiveDocument.HMIObjects.AddHMIObject("3DBar1", "HMI3DBarGraph")
With obj3DBar
.Layer03Checked = True
.Layer03Color = RGB(255, 0, 255)
End With
End Sub
See also
Layer03Checked Property (Page 2167)
3DBarGraph Object (Page 1805)
Layer03Value Property
Description
Defines or returns the value for "limit 3" in the case of the 3DBarGraph object.
Monitoring only takes effect when the Layer03Checked property value is set to TRUE.
Example:
The "HMI3DBarGraphConfiguration()" procedure accesses the properties of the 3DBarGraph
object. In this example the value for limit 3 will be defined as "30":
Sub HMI3DBarGraphConfiguration()
'VBA565
Dim obj3DBar As HMI3DBarGraph
Set obj3DBar = ActiveDocument.HMIObjects.AddHMIObject("3DBar1", "HMI3DBarGraph")
With obj3DBar
.Layer03Checked = True
.Layer03Value = 30
End With
End Sub
See also
Layer03Checked Property (Page 2167)
3DBarGraph Object (Page 1805)
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
System Manual, 11/2008,
2169
Layer04Checked Property
Description
TRUE if limit 4 is to be monitored in the case of the 3DBarGraph object. BOOLEAN write-read
access.
Limit value and representation are defined with the Layer04Value and Layer04Color
properties.
Example:
The "HMI3DBarGraphConfiguration()" procedure accesses the properties of the 3DBarGraph
object. In this example, limit 4 will be monitored:
Sub HMI3DBarGraphConfiguration()
'VBA566
Dim obj3DBar As HMI3DBarGraph
Set obj3DBar = ActiveDocument.HMIObjects.AddHMIObject("3DBar1", "HMI3DBarGraph")
With obj3DBar
.Layer04Checked = True
End With
End Sub
See also
Layer04Value Property (Page 2171)
Layer04Color Property (Page 2170)
3DBarGraph Object (Page 1805)
Layer04Color Property
Description
Defines or returns the color for limit 4 of the 3DBarGraph object. LONG write-read access.
When monitoring of the limit value is activated (Layer04Checked 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)
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
2170
System Manual, 11/2008,