Rerouting dynamic connector from VB(A) ?

K

Kari Yli-Kuha

Hi,

is there a way to force a dynamic connector to reroute itself
from VBA/VBVSL ? I mean like from the dynamic connector
action menu "Reroute Connector".

I've only found the VisUICmds members visCmdSetDynConn*
(like visCmdSetDynConnRerouteFreely, visCmdSetDynConnRerouteAsNeeded etc)
but these only set the behaviour of the connector.

The reason I ask is that I'm trying to simulate a cable by creating
a grouped "cable" shape with dynamic connectors as subshapes.
In such a shape the dynamic connectors behave somewhat erratically
when connected to a connection point, e.g. don't obey the
DirX/DirY alignment vector components unless explicitly rerouted
with action menu "Reroute Connector".

regards,
/C
 
C

Chris Roth

Just off the top of my head, without having tried any, a couple of possible
ideas and kludges come to mind:

- Play with this setting: Format > Behavior > Connector > Reroute drop-down.
(Reroute Freely or As Needed sound like good options...)
This option is stored in the ShapeSheet cell: ShapeLayout.ConFixedCode.
- Play with the layout-related ShapeSheet cells such as
Miscellaneous.ObjType, Layout.RouteStyle, Glue section values.
Click on a cell and press F1 to get an idea of what each cell does. I
can't keep them straight.
- Try programmatically changing & resetting cells mentioned in the previous
point?
- Programmatically disconnect/reconnect the connector

--

Hope this helps,

Chris Roth
Visio MVP

(e-mail address removed)

Need stencils or ideas? http://www.mvps.org/visio/3rdparty.htm
Need VBA examples? http://www.mvps.org/visio/VBA.htm
Common Visio Questions http://www.mvps.org/visio/common_questions.htm
 
K

Kari Yli-Kuha

Chris Roth said:
Just off the top of my head, without having tried any, a couple of possible
ideas and kludges come to mind:

- Play with this setting: Format > Behavior > Connector > Reroute drop-down.
(Reroute Freely or As Needed sound like good options...)
This option is stored in the ShapeSheet cell: ShapeLayout.ConFixedCode.
- Play with the layout-related ShapeSheet cells such as
Miscellaneous.ObjType, Layout.RouteStyle, Glue section values.
Click on a cell and press F1 to get an idea of what each cell does. I
can't keep them straight.
- Try programmatically changing & resetting cells mentioned in the previous
point?
- Programmatically disconnect/reconnect the connector

Thanks, I'll experiment(ate) with those.

After a quick try it seems that only setting ConFixedCode = "Reroute Freely"
has the desired effect. Setting/Resetting cell values don't seem to have any
effect _after_ the dynamic connector has been glued.

I might try using EventFXMod cell?

I still miss the DoCmd(visCmdDynConnReroute) or something alike, though...

thanks,
/C
 

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