Am currently using the GluedShapes - visGluedShapesAll1D Method , and i noticed an inconsistent behavior; when i added a container on the page, noting that this containeris not connected to any shape, anddoesn't contain any shape in the page such as,
The debug.print for GluedShapes.Name before adding the container on the page (without connecting it to any object) were:
Dynamic Connector
Dynamic connector.5
The debug.print for GluedShapes.Name after adding the container were:
Circle
Dynamic connector.5
Noting that the selected shape is an ellipse which is connected with two shapes (Rectangle: incoming node, and Circle Outgoing node) using two dynamic connectors (Dynamic Connector, Dynamic Connector.5) respectively.
Is there any explanation for this issue?
Public Sub ConnectedShapes_Outgoing_Example() ' Get the shapes that are connected to the selected shape ' by outgoing connectors. Dim vsoShape As Visio.Shape Dim lngShapeIDs() As Long Dim intCount As Integer If ActiveWindow.Selection.Count = 0 Then MsgBox ("Please select a shape that has connections") Exit Sub Else Set vsoShape = ActiveWindow.Selection(1) End If lngShapeIDs = vsoShape.GluedShapes(0, "") Debug.Print "Shapes at the end of outgoing connectors:" For intCount = 0 To UBound(lngShapeIDs) Debug.Print ActivePage.Shapes(lngShapeIDs(intCount)).Name Next End Sub