Remarks Properties Samples

read only
read only


With this object you have the opportunity to get informations about a selected procedural element.


ElementID ElementRef Node1
Node2 Picture SourceID
Type Variable  


Sub ALCEdge()

Dim zAlcEngine As ALCEngine 'Object from type ALCEngine
Dim zAlcEdge As ALCEdge 'Child object from type ALCEngine
Dim zAlcNode1 As ALCNode 'Child object from type ALCEngine
Dim zAlcNode2 As ALCNode 'Child object from type ALCEngine

'Get ALCEngine data from the project
Set zAlcEngine = thisProject.ALCEngine
'Get the first procedural element of the project
Set zAlcEdge = zAlcEngine.EdgeItem(0)

'Returns the ID of the procedural element in the picture
MsgBox "ElementID of the procedural element = " & zAlcEdge.ElementID
'Returns the picture in which the procedural element is used
MsgBox "Picture = " & zAlcEdge.Picture
'Returns the ID of the ALC source (the list of these IDs is available at the project property "Automatic line coloring")
MsgBox "Source ID = " & zAlcEdge.SourceID

'Returns the type of procedural element
If zAlcEdge.Type = 0 Then
MsgBox "Type = tpALCTypeNode"
ElseIf zAlcEdge.Type = 1 Then
MsgBox "Type = tpALCTypeSource"
ElseIf zAlcEdge.Type = 2 Then
MsgBox "Type = tpALCTypeSwitch"
ElseIf zAlcEdge.Type = 3 Then
MsgBox "Type = tpALCTypeSink"
ElseIf zAlcEdge.Type = 4 Then
MsgBox "Type = tpALCTypeTrafo"
ElseIf zAlcEdge.Type = 5 Then
MsgBox "Type = tpALCTypeLink"
End If

'Returns the variable which is linked to the procedural element
MsgBox "Linkes variable = " & zAlcEdge.Variable.Name

'Returns the first connected node (HINT:Not all procedural elements include two Nodes!)
Set zAlcNode1 = zAlcEdge.Node1
'Returns the ID of the node in the picture
MsgBox "Link ID Node1 = " & zAlcNode1.LinkID
'Returns the second connected node
Set zAlcNode2 = zAlcEdge.Node2
'Returns the ID of the node in the picture
MsgBox "Link ID Node2 = " & zAlcNode2.LinkID

End Sub