Назад
See also
MaximizeButton Property (Page 2208)
Selection Object (Listing) (Page 1949)
HMIObjects Object (Listing) (Page 1884)
HMIDefaultObjects Object (Listing) (Page 1878)
AddHMIObject Method (Page 1719)
VBA Reference (Page 1664)
Editing Objects with VBA (Page 1606)
Zoom Property (Page 2414)
WindowBorder Property (Page 2409)
Width Property (Page 2408)
Visible Property (Page 2405)
UpdateCycle Property (Page 2327)
Top Property (Page 2311)
TagPrefix Property (Page 2304)
Sizeable Property (Page 2292)
ServerPrefix Property (Page 2288)
ScrollPositionY Property (Page 2282)
ScrollPositionX Property (Page 2282)
ScrollBars Property (Page 2281)
PictureName Property (Page 2252)
OnTop Property (Page 2236)
OffsetTop Property (Page 2235)
OffsetLeft Property (Page 2235)
Name Property (Page 2228)
Moveable Property (Page 2227)
Left Property (Page 2192)
Layer Property (Page 2160)
Height Property (Page 2139)
CloseButton Property (Page 2065)
CaptionText Property (Page 2054)
Caption Property (Page 2053)
AdaptSize Property (Page 2001)
AdaptPicture Property (Page 2000)
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
System Manual, 11/2008,
1921
PieSegment Object
Description
Represents the "Pie Segment" object. The PieSegment object is an element of the following
listings:
Objects: Contains all objects of a picture.
Selection: Contains all selected objects of a picture.
HMIDefaultObjects: Contains the default property values of all standard, Windows, and
smart objects.
VBA Object Name
HMIPieSegment
Usage
Use the Add method to create a new "Pie Segment" object in a picture:
Sub AddPieSegment()
'VBA307
Dim objPieSegment As HMIPieSegment
Set objPieSegment = ActiveDocument.HMIObjects.AddHMIObject("PieSegment1", "HMIPieSegment")
End Sub
Use "HMIObjects"(Index)" to return an object from the HMIObjects listing, where Index in this
case identifies the object by name:
Sub EditPieSegment()
'VBA308
Dim objPieSegment As HMIPieSegment
Set objPieSegment = ActiveDocument.HMIObjects("PieSegment1")
objPieSegment.BorderColor = RGB(255, 0, 0)
End Sub
Use "Selection"(Index) to return an object from the Selection listing:
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
1922
System Manual, 11/2008,
Sub ShowNameOfFirstSelectedObject()
'VBA309
'Select all objects in the picture:
ActiveDocument.Selection.SelectAll
'Get the name from the first object of the selection:
MsgBox ActiveDocument.Selection(1).ObjectName
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,
1923
See also
Filling Property (Page 2106)
Selection Object (Listing) (Page 1949)
HMIObjects Object (Listing) (Page 1884)
HMIDefaultObjects Object (Listing) (Page 1878)
AddHMIObject Method (Page 1719)
VBA Reference (Page 1664)
Editing Objects with VBA (Page 1606)
Width Property (Page 2408)
Visible Property (Page 2405)
Top Property (Page 2311)
ToolTipText Property (Page 2310)
StartAngle Property (Page 2296)
Radius Property (Page 2268)
PasswordLevel Property (Page 2244)
Operation Property (Page 2237)
Name Property (Page 2228)
Left Property (Page 2192)
Layer Property (Page 2160)
Height Property (Page 2139)
FlashRateBorderColor Property (Page 2120)
FlashRateBackColor Property (Page 2119)
FlashBorderColor Property (Page 2112)
FlashBackColor Property (Page 2111)
FillStyle Property (Page 2108)
FillingIndex Property (Page 2107)
FillColor Property (Page 2104)
EndAngle Property (Page 2098)
BorderWidth Property (Page 2045)
BorderStyle Property (Page 2043)
BorderFlashColorOn Property (Page 2042)
BorderFlashColorOff Property (Page 2040)
BorderColor Property (Page 2036)
BorderBackColor Property (Page 2035)
BackFlashColorOn Property (Page 2022)
BackFlashColorOff Property (Page 2021)
BackColor Property (Page 2017)
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
1924
System Manual, 11/2008,
Polygon Object
Description
Represents the "Polygon" object. The Polygon object is an element of the following listings:
Objects: Contains all objects of a picture.
Selection: Contains all selected objects of a picture.
HMIDefaultObjects: Contains the default property values of all standard, Windows, and
smart objects.
VBA Object Name
HMIPolygon
Usage
Use the Add method to create a new "Polygon" object in a picture:
Sub AddPolygon()
'VBA310
Dim objPolygon As HMIPolygon
Set objPolygon = ActiveDocument.HMIObjects.AddHMIObject("Polygon", "HMIPolygon")
End Sub
Use "HMIObjects"(Index)" to return an object from the HMIObjects listing, where Index in this
case identifies the object by name:
Sub EditPolygon()
'VBA311
Dim objPolygon As HMIPolygon
Set objPolygon = ActiveDocument.HMIObjects("Polygon")
objPolygon.BorderColor = RGB (255, 0, 0)
End Sub
Use "Selection"(Index) to return an object from the Selection listing:
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
System Manual, 11/2008,
1925
Sub ShowNameOfFirstSelectedObject()
'VBA312
'Select all objects in the picture:
ActiveDocument.Selection.SelectAll
'Get the name from the first object of the selection:
MsgBox ActiveDocument.Selection(1).ObjectName
End Sub
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
1926
System Manual, 11/2008,
See also
ToolTipText Property (Page 2310)
BorderBackColor Property (Page 2035)
Selection Object (Listing) (Page 1949)
HMIObjects Object (Listing) (Page 1884)
HMIDefaultObjects Object (Listing) (Page 1878)
AddHMIObject Method (Page 1719)
VBA Reference (Page 1664)
Editing Objects with VBA (Page 1606)
Width Property (Page 2408)
Visible Property (Page 2405)
Top Property (Page 2311)
RotationAngle Property (Page 2274)
ReferenceRotationTop Property (Page 2271)
ReferenceRotationLeft Property (Page 2270)
PointCount Property (Page 2256)
PasswordLevel Property (Page 2244)
Operation Property (Page 2237)
Name Property (Page 2228)
Left Property (Page 2192)
Layer Property (Page 2160)
Index Property (Page 2145)
Height Property (Page 2139)
FlashRateBorderColor Property (Page 2120)
FlashRateBackColor Property (Page 2119)
FlashBorderColor Property (Page 2112)
FlashBackColor Property (Page 2111)
FillStyle Property (Page 2108)
FillingIndex Property (Page 2107)
Filling Property (Page 2106)
FillColor Property (Page 2104)
BorderWidth Property (Page 2045)
BorderStyle Property (Page 2043)
BorderFlashColorOn Property (Page 2042)
BorderFlashColorOff Property (Page 2040)
BorderColor Property (Page 2036)
BackFlashColorOn Property (Page 2022)
BackFlashColorOff Property (Page 2021)
BackColor Property (Page 2017)
ActualPointTop Property (Page 1998)
ActualPointLeft Property (Page 1997)
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
System Manual, 11/2008,
1927
PolyLine Object
Description
Represents the "Polyline" object. The PolyLine object is an element of the following listings:
Objects: Contains all objects of a picture.
Selection: Contains all selected objects of a picture.
HMIDefaultObjects: Contains the default property values of all standard, Windows, and
smart objects.
VBA Object Name
HMIPolyLine
Usage
Use the Add method to create a new "Polyline" object in a picture:
Sub AddPolyLine()
'VBA313
Dim objPolyLine As HMIPolyLine
Set objPolyLine = ActiveDocument.HMIObjects.AddHMIObject("PolyLine1", "HMIPolyLine")
End Sub
Use "HMIObjects"(Index)" to return an object from the HMIObjects listing, where Index in this
case identifies the object by name:
Sub EditPolyLine()
'VBA314
Dim objPolyLine As HMIPolyLine
Set objPolyLine = ActiveDocument.HMIObjects("PolyLine1")
objPolyLine.BorderColor = RGB(255, 0, 0)
End Sub
Use "Selection"(Index) to return an object from the Selection listing:
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
1928
System Manual, 11/2008,
Sub ShowNameOfFirstSelectedObject()
'VBA315
'Select all objects in the picture:
ActiveDocument.Selection.SelectAll
'Get the name of the first object of the selection:
MsgBox ActiveDocument.Selection(1).ObjectName
End Sub
Use the "HMIDefaultObjects(Index)" to return an object from the HMIDefaultObjects Listing:
Sub EditDefaultPropertiesOfPolyLine()
'VBA316
Dim objPolyLine As HMIPolyLine
Set objPolyLine = Application.DefaultHMIObjects("HMIPolyLine")
objPolyLine.BorderColor = RGB(255, 255, 0)
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,
1929
See also
HMIDefaultObjects Object (Listing) (Page 1878)
BorderEndStyle Property (Page 2039)
Selection Object (Listing) (Page 1949)
HMIObjects Object (Listing) (Page 1884)
AddHMIObject Method (Page 1719)
VBA Reference (Page 1664)
Editing Objects with VBA (Page 1606)
Width Property (Page 2408)
Visible Property (Page 2405)
Top Property (Page 2311)
ToolTipText Property (Page 2310)
RotationAngle Property (Page 2274)
ReferenceRotationTop Property (Page 2271)
ReferenceRotationLeft Property (Page 2270)
PointCount Property (Page 2256)
PasswordLevel Property (Page 2244)
Operation Property (Page 2237)
Name Property (Page 2228)
Left Property (Page 2192)
Layer Property (Page 2160)
Index Property (Page 2145)
Height Property (Page 2139)
FlashRateBorderColor Property (Page 2120)
FlashBorderColor Property (Page 2112)
BorderWidth Property (Page 2045)
BorderStyle Property (Page 2043)
BorderFlashColorOn Property (Page 2042)
BorderFlashColorOff Property (Page 2040)
BorderColor Property (Page 2036)
BorderBackColor Property (Page 2035)
ActualPointTop Property (Page 1998)
ActualPointLeft Property (Page 1997)
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
1930
System Manual, 11/2008,