In the Shape Sheet - Determine if connetion point has a connector glued to it

Started by DJHarris71, September 18, 2014, 12:59:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DJHarris71

In the shape sheet:

For a shape, is there a way to determine if there is a connector connected to a connection point?

- or -

For a connector, Is there a way to evaluate the BeginX/Y Forumla (not the value) to get the Shape a connector is connected to?  And if so I would then need to refrence that shapes props.

I'd like to do this in the shape sheet rather than code beacuse I don't think there is a "OnGlueChange" event (an event that fires when a connector becomes glued or unglued to a shape connector).  If there was such a thing, code would be a good solution.

I found this solution (link below), but this is a add or delete event only and this is way more complicated than I want to deal with.
http://blog.bvisual.net/2013/05/21/getting-the-name-of-glued-connection-points/

Seems like this would be a simple concept for visio - but I am guessing not.

Jumpy

There's now way to do this in the shapesheet alone. The way with code described in the blog articel you mentioned is the easiest way to go.


wapperdude

Which version of Visio?

The following post may prove useful, be sure to go to the last entry:  Finding & Highlighting Connected Shapes    http://visguy.com/vgforum/index.php?topic=5835.msg23413#msg23413

Beginning with V2010, the code can be somewhat simplified:  Shape.ConnectedShapes Method (Visio)  http://msdn.microsoft.com/en-us/library/office/ff767122(v=office.15).aspx

HTH
Wapperdude
Visio 2019 Pro

DJHarris71

Thanks for the feedback.  It was as I suspected - not capable in the shapesheet.

At this point I dont think I will try the code.  I need the flow arrows to react to data in the shape that it gets glued, forget the shape data when unglued and react when the data changes in a shape.  The last is the easy part.  The code snippets posted above seem to be only on Add and Delete - not Glue and Unglue.

wapperdude

QuoteThe code snippets posted above seem to be only on Add and Delete - not Glue and Unglue.

If you mean are they automatically triggered, then, no, they are not.  As far as a gluing / ungluing event, I'm not aware of such.  Here is a list of V2013 event codes:  http://msdn.microsoft.com/en-us/library/office/ff768620(v=office.15).aspx.  I'm sure such a list exists for previous versions.  My guess is that you need to look at the connector BeginX or EndX cells and trigger on a cell changed event or cell formula changed event.   So, in each connector shapesheet, you could use a Dependson formula that would notice the change and trigger a macro.  Of course, that might re-trigger the macro if it introduces a change to either end point.

Wapperdude
Visio 2019 Pro