Change connection layout programatically

  • Thread starter Mats-Lennart Hansson
  • Start date
M

Mats-Lennart Hansson

Hi,
I have a Visio add-in (C#) in which I programatically add shapes and
connections to a page.This works ok, but I'm having problem setting start-
and end points on the connections as well as changing its layout.

My questions:

1. Instead of using pinX and pinY, is it possible to connect to a shapes
connection point (the blue cross)?
2. Can I change the layout of the connection arrow? I've tried to
programatically change the geometry cells, but nothing happens.

Thanks,
Mats-Lennart
 
S

shashi behari

1) Do you mean instead of using Dynamic Glue ? because either way, you have
to use the pin* cells just with different values. it is possible, just a bit
more complicated, you have to get the right connection point then set the
endX/endY value of the connector to the right connection point cell in the
shape. probably like this:
=PAR(PNT(Square!Connections.X5,Square!Connections.Y5))
though there might be a better way to do this in automation. if you're using
the shape.glueto method maybe try to glue to that connection cell you need.

2) you change the connection arrow & layout stuff in the line format & shape
layout sections. the following cells may help..

line format:
BeginArrow
EndArrow
BeginArrowSize
EndArrowSize

shape layout:
ShapeRouteStyle
ConFixedCode

there is also the PageLayout->RouteStyle cell in the page sheet, though this
is for performing layout on the whole page and not specific connecors.

good luck...
 

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