G
Gerald K
Hi - I am trying to view the connects collection for an object (arc) so I can
then check if the two objects connected are of the same type or not.
I have written the following code, but it doesn't seem to work:
arcConns.Count (the number of connections) is always zero!
I am calling this procedure from the EventXFMod field in the shapesheet.
Any ideas what's wrong???
-------------------------------
Sub ValidateLink(shpObj As Visio.Shape)
Dim mastObj As Master
Dim fromObj As Shape
Dim arcConns As Connects
Dim arcConn As Connect
Dim intCounter As Integer
Set mastObj = shpObj.Master
' Get Master property of shape
Set arcConns = mastObj.Connects
' Get the connects collection of the source shape
For intCounter = 1 To arcConns.Count
Set arcConn = arcConns(intCounter)
Set fromObj = arcConn.FromSheet
MsgBox ("connector: " + fromObj.Name)
Next intCounter
End Sub
then check if the two objects connected are of the same type or not.
I have written the following code, but it doesn't seem to work:
arcConns.Count (the number of connections) is always zero!
I am calling this procedure from the EventXFMod field in the shapesheet.
Any ideas what's wrong???
-------------------------------
Sub ValidateLink(shpObj As Visio.Shape)
Dim mastObj As Master
Dim fromObj As Shape
Dim arcConns As Connects
Dim arcConn As Connect
Dim intCounter As Integer
Set mastObj = shpObj.Master
' Get Master property of shape
Set arcConns = mastObj.Connects
' Get the connects collection of the source shape
For intCounter = 1 To arcConns.Count
Set arcConn = arcConns(intCounter)
Set fromObj = arcConn.FromSheet
MsgBox ("connector: " + fromObj.Name)
Next intCounter
End Sub