Example:
In the following example the radius of a circle will be dynamically configured using the Dynamic
dialog, a tag name will be assigned and the associated property values will be assigned to
both the binary value ranges:
Sub AddDynamicDialogToCircleRadiusTypeBinary()
'VBA648
Dim objDynDialog As HMIDynamicDialog
Dim objCircle As HMICircle
Set objCircle = ActiveDocument.HMIObjects.AddHMIObject("Circle_C", "HMICircle")
Set objDynDialog = objCircle.Radius.CreateDynamic(hmiDynamicCreationTypeDynamicDialog,
"'NewDynamic1'")
With objDynDialog
.ResultType = hmiResultTypeBool
.BinaryResultInfo.NegativeValue = 20
.BinaryResultInfo.PositiveValue = 40
End With
End Sub
See also
VBA Reference (Page 1664)
PositiveValue Property (Page 2258)
BinaryResultInfo Object (Page 1822)
Number Property
Description
Returns the layer number of a "Layer" type object. The counting starts with 1. The first layer,
"Layer0", returns the value "0". READ access.
Example:
This example outputs the name, number and index of a layer:
Sub ShowLayerWithNumbers()
'VBA803
Dim colLayers As HMILayers
Dim objLayer As HMILayer
Dim iAnswer As Integer
Dim iIndex As Integer
iIndex = 1
Set colLayers = ActiveDocument.Layers
For Each objLayer In colLayers
iAnswer = MsgBox("Layername: " & objLayer & vbCrLf & "Layernumber: " & objLayer.Number &
vbCrLf & "Layersindex: " & iIndex, vbOKCancel)
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
2230
System Manual, 11/2008,