Sub EditTubeTeeObject()
'VBA845
Dim objTubeTeeObject As HMITubeTeeObject
Set objTubeTeeObject = ActiveDocument.HMIObjects("T-piece")
objTubeTeeObject.BorderColor = RGB(255, 0, 0)
End Sub
Use "Selection"(Index) to return an object from the Selection listing:
Sub ShowNameOfFirstSelectedObject()
'VBA846
'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
See also
ObjectName Property (Page 2232)
Left Property (Page 2192)
Layer Property (Page 2160)
Top Property (Page 2311)
Width Property (Page 2408)
Height Property (Page 2139)
BorderColor Property (Page 2036)
BorderWidth Property (Page 2045)
ToolTipText Property (Page 2310)
Visible Property (Page 2405)
PasswordLevel Property (Page 2244)
Operation Property (Page 2237)
FlashRateBorderColor Property (Page 2120)
BorderFlashColorOn Property (Page 2042)
BorderFlashColorOff Property (Page 2040)
FlashBorderColor Property (Page 2112)
Transparency property (Page 2313)
GlobalShadow property (Page 2135)
GlobalColorScheme property (Page 2134)
RotationAngle Property (Page 2274)
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
System Manual, 11/2008,
1985