How to glue a connector to a connection point of a subshape in a container?

Started by doudou, October 15, 2014, 04:22:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

doudou

Hello,

I keep getting a GlueTo Method failed error message, when I try to run the following code, the execution chokes at Call shpConn.CellsU("BeginX").GlueTo(subShp.CellsSRC(7, 1, 0)), is it not possible to glue connectors to a connection point on the subshape of a container?

                If shp.Shapes.Count = 0 Then
                    Call shpConn.CellsU("BeginX").GlueTo(shp.CellsSRC(7, 1, 0))
                Else
                    For Each subShp In shp.Shapes
                        If subShp.CellsSRC(Visio.visSectionObject, Visio.visRowLine, Visio.visLineColor).FormulaU = "0" _
                        Or subShp.CellsSRC(Visio.visSectionObject, Visio.visRowLine, Visio.visLineColor).FormulaU = "THEMEGUARD(RGB(255,0,0))" Then
                            Call shpConn.CellsU("BeginX").GlueTo(subShp.CellsSRC(7, 1, 0))
                        End If
                    Next
                End If

Yacine

You should try GlueToPos instead of GlueTo. That's what the macro recorder does when I try to connect a connector to a sub-shape.
Yacine