See also
BarGraph Object (Page 1819)
Hysteresis Property (Page 2143)
4.4.8.8 I - K
Icon Property
Description
Defines the icon (*.ICO, full path and file name) or returns the path and file name for a button
on a user-defined toolbar.
Path specifications
The following path specification formats are possible:
● Absolute: z.B. "C:\Siemens\WinCC\Icons\myIcon.ICO.
● Relative: The starting folder for relative path specification is the "GraCS" folder of the current
project.
● <global>: Refers to the installation path for WinCC. The path specification "<global>\Icons
\myIcon" is the same as the path specification under "Absolute".
● <project>: Refers to the current project directory (see example).
Example:
The "CreateToolbar()" procedure creates a user-defined toolbar with two icons.
Sub CreateToolbar()
'VBA533
Dim objToolbar As HMIToolbar
Dim objToolbarItem As HMIToolbarItem
Dim strFileWithPath
Set objToolbar = ActiveDocument.CustomToolbars.Add("Tool1_1")
Set objToolbarItem = objToolbar.ToolbarItems.InsertToolbarItem(1, "ti1_1",
"myFirstToolbaritem")
Set objToolbarItem = objToolbar.ToolbarItems.InsertToolbarItem(2, "ti1_2",
"mySecondToolbaritem")
'
'To use this example copy a *.ICO-Graphic
'to the "GraCS"-Folder of the actual project.
'Replace the filename "EZSTART.ICO" in the next commandline
'with the name of the ICO-Graphic you copied
strFileWithPath = Application.ApplicationDataPath & "EZSTART.ICO"
'
'To assign the symbol-icon to the first toolbaritem
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
2144
System Manual, 11/2008,