G
Gianluca Colaiacomo
Hello I've got a weird issue I was not able to fix it.
I need to retrieve connectors cells coordinates, so I've created the
following subroutine.
Sub controlla(shapeID As Long)
Dim Figura_1 As Visio.Shape
Dim ClX, ClY, ClEX, ClEY As Visio.Cell
Set Figura_1 = Application.ActiveWindow.Page.Shapes.ItemFromID(shapeID)
Set ClX = Figura_1.CellsU("BeginX")
'Set CellaX = Oggetto_1.CellsSRC(visSectionObject, visRowXForm1D,
vis1DBeginX)
Set ClY = Figura_1.CellsU("BeginY")
Set ClEX = Figura_1.CellsU("EndX")
Set ClEY = Figura_1.CellsU("EndY")
Debug.Print "Shape: " & Figura_1 & " x=" & ClX & " y=" & ClY & " x_end=" &
ClEX & " y_end=" & ClEY
End Sub
------------------------------------------------------------------
The issue is when I run the main code calling the subroutine, I've got shape
with wrong coordinates infos:
Shape: Dynamic connector.9 x=-0.5 y=0.5 x_end=0.5 y_end=-0.5
If before calling the subroutine I'll introduce a pause just before calling
the sub. or better if I'm executing code while debugging, I'll get the right
infos:
Shape: Dynamic connector.9 x=11.8420969132807 y=6.94832557237496
x_end=8.53862438383869 y_end=6.26752845355849
Any suggestion?
Any help will be appreciated
cheers
Gianluca
I need to retrieve connectors cells coordinates, so I've created the
following subroutine.
Sub controlla(shapeID As Long)
Dim Figura_1 As Visio.Shape
Dim ClX, ClY, ClEX, ClEY As Visio.Cell
Set Figura_1 = Application.ActiveWindow.Page.Shapes.ItemFromID(shapeID)
Set ClX = Figura_1.CellsU("BeginX")
'Set CellaX = Oggetto_1.CellsSRC(visSectionObject, visRowXForm1D,
vis1DBeginX)
Set ClY = Figura_1.CellsU("BeginY")
Set ClEX = Figura_1.CellsU("EndX")
Set ClEY = Figura_1.CellsU("EndY")
Debug.Print "Shape: " & Figura_1 & " x=" & ClX & " y=" & ClY & " x_end=" &
ClEX & " y_end=" & ClEY
End Sub
------------------------------------------------------------------
The issue is when I run the main code calling the subroutine, I've got shape
with wrong coordinates infos:
Shape: Dynamic connector.9 x=-0.5 y=0.5 x_end=0.5 y_end=-0.5
If before calling the subroutine I'll introduce a pause just before calling
the sub. or better if I'm executing code while debugging, I'll get the right
infos:
Shape: Dynamic connector.9 x=11.8420969132807 y=6.94832557237496
x_end=8.53862438383869 y_end=6.26752845355849
Any suggestion?
Any help will be appreciated
cheers
Gianluca