To get center of shape we have to use this lines.
Set object = AppVisio.ActiveWindow.Page.Shapes.ItemFromID(objectId)
connectingXfrom = object .CellsU("PinX").Result("in")
connectingYfrom = object .CellsU("PinY").Result("in")
The center of shape object is at point C[connectingXfrom, connectingYfrom]
Next two lines move first point of connector to point P[connectingXfrom, connectingYfrom]
Application.ActiveWindow.Page.Shapes.ItemFromID(connectorShapeId).CellsSRC(1, 4, 0).FormulaU = connectingXfrom
Application.ActiveWindow.Page.Shapes.ItemFromID(connectorShapeId).CellsSRC(1, 4, 1).FormulaU = connectingYfrom
If we want to start connecting from connection 1 but close to object 2, we need to do:
connectingXfrom = connectingXfrom - someDistanceValue
- someDistanceValue can be for example 1.5
- objectId is Id of Object 2 shape
- connectorShapeId is Id of connection 2 shape.