Connecting directly to connection points and not "glue to shape"

Started by CoreBuild, January 06, 2015, 03:34:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

CoreBuild

I have a series of customer master shapes that I have built in a custom stencil that I run in Visio 2010 and Visio 2013.  They are basically two ovals - one is called Start and one is called End. 

Each shape consists of the following:
An oval shape - containing:
- A group - containing:
     - A ConnectorMap shape, which includes a connection point
     - A Data shape, which has all of the data I need

On the Start shape - the connection point on the ConnectorMap shape should only take outbound connections.  On the End shape the connection point on the ConnectorMap should only take inbound connections.  That detail is a bit superfluous but I figured I'd mention it.

Anyway, the problem that I'm having is that I don't want these shapes to be able to be glued to anywhere except for the connection point.  I've been working on this for a while but it still appears to be a mystery to me.

In the case of the Start shape, I can't even connect a connector to the connection point.  I keep getting a "Glue to Shape" behavior even though I can see the connection point dot when I'm moving the connector.  In the End shape, I can get the connector to glue to the connection point or the shape, which I suppose is better.  The problem there is that both the beginning and the end of the connector can be connected to that point.  My connection points on both shapes are of "Type / C"=0.

Does anyone have any ideas as to how I can prevent the shapes from being about to be glued to and/or proper directional connections?

Thanks!


JuneTheSecond

QuoteI don't want these shapes to be able to be glued to anywhere except for the connection point.
You can customize as you wish with programing, VBA or any other.
That is, the program rejects connection, if the connection is not to the specified connection point.
Best Regards,

Junichi Yoda
http://june.minibird.jp/

Yacine

Hi CoreBuild,
I would add to Junichi's answer, that the gluing is controlled at application level.
The user can modify the settings at will. There's no integrated solution for controlling this at shape level.


If you want to control the behavior of the gluing, you must catch the gluing event and modify the connection to your needs (... with VBA!).
Something like "connector has been glued to a shape" --> "is it the right shape?", "is it the right point?" ELSE "delete connection", "make new correct connection" or "Message: So and so"


I haven't done this before, but I could imagine that it is feasible with a fair amount of work.


HTH,
Yacine
Yacine

CoreBuild

That seems doable.  Just to clarify...this is a macro that I would add to the stencil to control shape events or to the document to catch document events?

I looked through the reference but the event to capture isn't obvious to me...

Thanks again for the suggestions.

Yacine

Yacine

JuneTheSecond

And here is a set of my drawing and stencil.
Stencil has VBA macros.
In "calc.vsd" conection will be rejected when you glue to other than connection point.
Best Regards,

Junichi Yoda
http://june.minibird.jp/