T
Tim Shirley
I've written some code to create some shapes (it was
easier than drawing them) and added connection points
(took a while to figure that out). Now I went to use the
shape and found out that when I drag the sizing box for
the shape the geometry (lines) scale but the connection
points don't move.
How do I fix it with VBA code
Here's the add connections portion of code I used...
'Use the DrawPolyLine method to draw a 1D shape.
Set myAmpObj = ActivePage.DrawPolyline(arrXY,
visPolyline1D)
With myAmpObj
' add a connection point section and define it's
coordinates
.AddSection visSectionConnectionPts
.AddRow visSectionConnectionPts,
visRowConnectionPts, visTagCnnct
.Cells("Connections.X1") = (0 * dblScaleFactor)
.Cells("Connections.Y1") = (1 * dblScaleFactor)
.AddRow visSectionConnectionPts,
visRowConnectionPts + 1, visTagCnnct
.Cells("Connections.X2") = (2 * dblScaleFactor)
.Cells("Connections.Y2") = (1 * dblScaleFactor)
End With
myAmpObj.Name = strName
easier than drawing them) and added connection points
(took a while to figure that out). Now I went to use the
shape and found out that when I drag the sizing box for
the shape the geometry (lines) scale but the connection
points don't move.
How do I fix it with VBA code
Here's the add connections portion of code I used...
'Use the DrawPolyLine method to draw a 1D shape.
Set myAmpObj = ActivePage.DrawPolyline(arrXY,
visPolyline1D)
With myAmpObj
' add a connection point section and define it's
coordinates
.AddSection visSectionConnectionPts
.AddRow visSectionConnectionPts,
visRowConnectionPts, visTagCnnct
.Cells("Connections.X1") = (0 * dblScaleFactor)
.Cells("Connections.Y1") = (1 * dblScaleFactor)
.AddRow visSectionConnectionPts,
visRowConnectionPts + 1, visTagCnnct
.Cells("Connections.X2") = (2 * dblScaleFactor)
.Cells("Connections.Y2") = (1 * dblScaleFactor)
End With
myAmpObj.Name = strName