Connector End point reads text at hooked-up shape?

Started by novski, April 22, 2014, 08:38:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

novski

Hi
Coming to the next step of my connector i wold like it to read the text of the shape that is connected to the end point of my connector line.
Is that possible?

:o
novski

Jumpy

Now you have to use at least VBA event handling. You have to capture the "Shape connected" event, analyse the shapes that are connected and write the text to some user defined cell or textbox of your connector.

http://msdn.microsoft.com/de-de/library/office/ff768510%28v=office.15%29.aspx

novski

uuuuhhh. 
i always wanted to avoid this situation.
Is there no way to get visio connectors, to spit out where they are hooked up to?

The point is. I have never programmed jet.

aledlund

the short answer is that it has to be accomplished with code.
al

novski

Ok. Thanks for the clear answer. I will try that and come back to this in a few days.
Best Regards
Novski

Yacine

Hi Novski,
we've posted some days ago a chunk of code that can more or less be adapted universally.
http://visguy.com/vgforum/index.php?topic=5420.0
Cheers,
Yacine
Yacine

novski

#6
oh. Thanks. I will go through that later.

If you could give a quick answer about the possibility of briefly described: a connector that connects to a shape in a group..

I have a group of shapes and several connection points on different shapes. But just one of the shapes has Shape-Data and in this data there is a row that describes the name of the whole group. Is it possible to determine which shape in the group has shape data, to get the name, somehow?

Jumpy

Short Answer: Yes that is possible with code.

The steps:
- Detect connection / use connection added event to fire your code
- Identify the shape the connector connected to
- Look at this shapes parent:
-- if it's another shape, repeat: look at it's parent
-- if it's the page, you have found the group shape that contains all your shapes in that group
- Starting from the group shape: Loop through all shapes in the group and look for the one with the Shapedata

novski

hmm. now im currious!  ;D
have to go do this now... im shure im back with tonnes of quesions in a few minutes.  8)
thanks for the step through...
novski

novski

Ok not many questions but one big.

O managed (in 3h  :o) to  get a shape load a VBA script. It makes a message box telling me the script is done.

MsgBox "done!"

But that's all.
So i defensively need some help.
i didn't find a connection added event. Instead i found a argument called Connect.ToCell

If you wold write me the full name of the event i can google it and may find a was to go on..

thanks
novski


novski

Wow.
That means there is a way to get the data of a connected shape witout VBA!
I love the way Microsoft hides their work.
It always fills me with pleasure when i find a new hidden item!

vojo

runaddonwargs = VBA code they wrote

There is NO way to dynamically pull info from shape to another shape via shapesheet etc.