Using visCmdDRConnectorTool But With Different Connectors

P

Paul M

I am writing a Visio Automation app with my own UI. I want to have buttons to
select different connector styles (dynamic connector, curvy connector,
staright connector, etc). I can see how to use the visCmdDRConnectorTool
command but not how to programmatically switch which connector is then used.
I can see that selecting a connector from a stencil achieves this but I don't
want to litter my stencil with connectors.
Thanks!
 
M

Mark Nelson [MS]

Visio uses the master in the Document Stencil named "Dynamic Connector" with
the Connector Tool. You might be able to have multiple connector masters
and dynamically rename them when needed, but this seems risky.

What about creating a single connector master that is capable of taking on
all of the styles you want? Whenever a connector is added to the page, your
application sets the style on the connector based on your current setting.
This is the "multi-shape" concept, which you can find out more about here:
http://blogs.msdn.com/visio/archive/2006/07/21/673305.aspx

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 
P

Paul M

Thanks for the suggestion, I'll look into that. But I am not sure I agree with:
Visio uses the master in the Document Stencil named "Dynamic Connector" with
the Connector Tool.

If I select the connector tool, then click on a connector shape in a
stencil, the connector tool uses that connector shape in place of Dynamic
Connector.

Thanks,
Paul
 
M

Mark Nelson [MS]

Yes, that action overrides the default Dynamic Connector master.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Top