V
vespasiandamascus
Hi everyone. I am trying to access the connects for a selection of
shapes. All my connectors are double-headed arrows, I'm not sure if
that makes a difference or not. Here is the code I am using:
Sub TestMac()
Dim vsoSelect As Visio.Selection
Dim vsoShape As Visio.Shape
Dim vsoConnects As Visio.Connects
Dim vsoConnect As Visio.Connect
Set vsoSelect = Visio.ActiveWindow.Selection
vsoSelect.IterationMode = Visio.VisSelectMode.visSelModeSkipSuper
For Each vsoShape In vsoSelect
Debug.Print vsoSelect.Count
Set vsoConnects = vsoShape.Connects
Debug.Print vsoConnects.Count
Next vsoShape
End Sub
-----
The vsoShape.Connects line is returning 0 every time.
If I use the FromConnects member instead of Connects, it returns the
correct number. I need to access the Connects however, as I need to
find the actual shapes that each shape in my selection connect to.
Does anyone know what I am missing?
Thanks in advance.
shapes. All my connectors are double-headed arrows, I'm not sure if
that makes a difference or not. Here is the code I am using:
Sub TestMac()
Dim vsoSelect As Visio.Selection
Dim vsoShape As Visio.Shape
Dim vsoConnects As Visio.Connects
Dim vsoConnect As Visio.Connect
Set vsoSelect = Visio.ActiveWindow.Selection
vsoSelect.IterationMode = Visio.VisSelectMode.visSelModeSkipSuper
For Each vsoShape In vsoSelect
Debug.Print vsoSelect.Count
Set vsoConnects = vsoShape.Connects
Debug.Print vsoConnects.Count
Next vsoShape
End Sub
-----
The vsoShape.Connects line is returning 0 every time.
If I use the FromConnects member instead of Connects, it returns the
correct number. I need to access the Connects however, as I need to
find the actual shapes that each shape in my selection connect to.
Does anyone know what I am missing?
Thanks in advance.