ALCEngine

 

Remarks Properties Methods Samples

ED
read only
RT
read only

Remarks:Top

With this object you have the opportunity to get line and procedural elements via an index or from specific pictures and specific Element IDs.

Properties:Top

EdgeCount NodeCount Parent

Methods:Top

EdgeItem FindEdge FindEdgeByRef
FindNode FindNodeByRef NodeItem

Samples:Top



'This method searches a procedural element via an index in the project
Sub GetEdgeItem()

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

'Get ALCEngine data from the project
Set zAlcEngine = thisProject.ALCEngine
'Get the first ALC procedural element of the project
Set zAlcEdge = zAlcEngine.EdgeItem(0)
MsgBox "Element is in picture = " & zAlcEdge.Picture
FindEdge

End Sub

'This method searches for a procedural element in a specific picture with a specific ElementID
Sub FindEdge()

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

'Get ALCEngine data from the project
Set zAlcEngine = thisProject.ALCEngine
'Returns an ALC procedural element with a specific ID (element ID in the picture) from a specific picture
Set zAlcEdge = zAlcEngine.FindEdge("BILD3", 10)
'Show the name of the variable which is connected to the procedural element
MsgBox "Variable of the element = " & zAlcEdge.Variable.Name
NodeItem

End Sub

'This method searches a line element via an index in the project
Sub NodeItem()

Dim zAlcEngine As ALCEngine 'Object from type ALCEngine
Dim zAlcNode As ALCNode 'Child object from type ALCEngine
Dim LineStates As Variant 'Collect the line states
Dim i As Integer

'Get ALCEngine data from the project
Set zAlcEngine = thisProject.ALCEngine
'Number of connections in the project
MsgBox "Node count = " & zAlcEngine.NodeCount
'Get the first line element of the picture
Set zAlcNode = zAlcEngine.NodeItem(0)

LineStates = zAlcNode.LineStates
'Show the first line state in RT (Be careful that the line has to have a state unequal "empty")
MsgBox "Line state = " & LineStates(0)
FindNode

End Sub

'This method searches for a line element in a specific picture with a specific ElementID
Sub FindNode()

Dim zAlcEngine As ALCEngine 'Object from type ALCEngine
Dim zAlcNode As ALCNode 'Child object from type ALCEngine

'Get ALCEngine data from the project
Set zAlcEngine = thisProject.ALCEngine
'Returns an ALC line element with a specific ID (element ID in the picture) from a specific picture
Set zAlcNode = zAlcEngine.FindNode("BILD3", 18)
'Returns the number of procedural elements which are connected to the line element
MsgBox "Number of connected procedural elements = " & zAlcNode.EdgeCount

End Sub