Example:
The "CreateMenuItem()" procedure creates the "Delete Objects" menu and adds two menu
entries
("Delete Rectangles" and "Delete Circles"): The first menu entry is also marked with a
tick:
Sub CreateMenuItem()
'VBA436
Dim objMenu As HMIMenu
Dim objMenuItem As HMIMenuItem
'
'Add new menu "Delete objects" to menubar:
Set objMenu = ActiveDocument.CustomMenus.InsertMenu(1, "DeleteObjects", "Delete objects")
'
'Add two menuitems to the new menu
Set objMenuItem = objMenu.MenuItems.InsertMenuItem(1, "DeleteAllRectangles", "Delete
Rectangles")
Set objMenuItem = objMenu.MenuItems.InsertMenuItem(2, "DeleteAllCircles", "Delete Circles")
With objMenu.MenuItems
.Item("DeleteAllRectangles").Checked = True
End With
End Sub
See also
MenuItems Property (Page 2222)
Configuring Menus and Toolbars (Page 1572)
CheckLimitHigh4 Property
Description
TRUE if the "Reserve 4" high limit value of the bar graph object is to be monitored. BOOLEAN
write-read access.
The limit value, the display on reaching the limit value and the type of evaluation are defined
via the properties LimitHigh4, ColorLimitHigh4 and TypeLimitHigh4.
Example:
The "BarGraphLimitConfiguration()" procedure configures the properties of the high limit value
for
an alarm. In this example the type of evaluation will be set to "Absolute". The alarm will be
triggered at a value of "70".
Sub BarGraphLimitConfiguration()
'VBA437
Dim objBarGraph As HMIBarGraph
Set objBarGraph = ActiveDocument.HMIObjects.AddHMIObject("Bar1", "HMIBarGraph")
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
System Manual, 11/2008,
2057