Connection points don't scale with shape sizing handles

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
 
T

Tim Shirley

Never mind. Figured this one out. Just set the
coordinates of the Connection points to a formula
referenced to Height and Width. Not so bad...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top