Remarks Properties Methods Samples

read only
read only


With this object you have the opportunity to get informations about the line and procedural elements of a single node in your topology.


EdgeCount ElementIDs ElementRefs
LineStates LinkID Pictures




Sub ALCNode()

Dim zAlcEngine As ALCEngine 'Object from type ALCEngine
Dim zAlcNode As ALCNode 'Child object from type ALCEngine
Dim zAlcEdge As ALCEdge 'Child object from type ALCEngine
Dim CountElements As Long
Dim LineStates As Variant
Dim i As Integer

'Get ALCEngine data from the project
Set zAlcEngine = thisProject.ALCEngine
'Get the first node of the project
Set zAlcNode = zAlcEngine.NodeItem(2)

'Return the number of procedural devices which are connected to the node
MsgBox "Number of connected procedural elements = " & zAlcNode.EdgeCount
'Return one of the connected procedural elements
Set zAlcEdge = zAlcNode.EdgeItem(0)
'Return type of connected 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

'Return number of line elements which are connected to the node
CountElements = UBound(zAlcNode.ElementIDs)
MsgBox "Number of connected line elements = " & CountElements

'Print current states of a node
If (IsEmpty(zAlcNode.LineStates)) Then
	Debug.Print "No line state active"
	LineStates = zAlcNode.LineStates
	For i = 0 To UBound(LineStates)
		Debug.Print "State " & i & " = " & LineStates(i)
	Next i
End If

'Return link ID if a link (procedural element) is connected to the node
MsgBox "Link ID = " & zAlcNode.LinkID

End Sub