Straight Line Connector

A

Andy

I have a right angle line that I am trying to convert to a straightline
from VBA.

I recorded the macro to do the conversion on the shape.

.....cellsrc(visSectionObject,visRowShapeLayout,visSLOLineRouteExt).formulaU
= 1

....cellsrc(visSectionObject,visRowShapeLayout,visSLORouteStyle).formulaU
= 16

This works fine when my dynamic connector is right-angled, succesfully
converterted to a straight line. However, if I than drag parts of the
line so it's no longer straight, the code fails to make the line
straight again. ALthough if I use the Straight Connector command of the
connector context menu, the line is drawn as a single straight line.
Seems the VBA (macro) code doesn't match what the command is doing.

Thanks
 
J

JuneTheSecond

Hi, Andy!

ConFixedCode cell should be put into 0, and move connected shape a little.

....CellsSRC(visSectionObject, visRowShapeLayout,
visSLOLineRouteExt).FormulaU = 1
....CellsSRC(visSectionObject, visRowShapeLayout,
visSLORouteStyle).FormulaU = 16
....CellsSRC(visSectionObject, visRowShapeLayout,
visSLOConFixedCode).FormulaU = 0

Dim begx As Double
begx = ConnectedShape.Cells("PinX")
ConnectedShape.Cells("PinX") = begx + 1#
DoEvents '' return control to operating system
ConnectedShape.Cells("PinX") = begx
 

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