Shape Data on connectors?

Started by jbenfield, March 29, 2013, 03:23:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jbenfield

I have a process shape with defined Input, Activity and Output data. What I'm trying to do is have the "Output" information automatically populate (and preferably stay linked to) the "Input" of the connected shape and then have that data displayed on the connector.

It seems like a simple thing, but I can't seem to get it to work. I'm new to the whole Visio object model, so I may be missing the obvious.

Any hints or suggestions?

aledlund

I'm a little confused on what you're looking for (my fault, not yours). Perhaps you could dummy up a drawing with the shapes that you are trying to work with and post it.
Al

jbenfield

Thanks for your response, aledlund. I should have provided a picture in the first place. It's always harder to describe a picture than to just draw it :)

This is the notation/format that I'm trying to duplicate in Visio.



Here's the behavior in Visio that's giving me trouble:



Ideally, I'd like the behavior to be dynamic so that the input, output and connector text all stay in sync. Even a macro that would add the next process box and copy the Output data to the Connector Text and the input field of the new shape would be a huge time saver when trying to capture a process. But I can't even get that to work :(

I tried looking at the database shapes to see how they kept he Entity Relationships in sync and on the connectors, but I couldn't glean much from it. I guess that I'm just not far enough along in my understanding of the model yet. (and not having a lot of luck finding similar examples to learn from. It seems like data on connectors [activity-on-arrow] isn't that common a requirement <shrug>)

Any advice or direction would be appreciated. I'm not even sure of the questions to ask, so anything would be helpful.

aledlund

I'm not surprised that chasing an entity diagram would give you a headache. Most of the sophisticated add-ins have custom code behind them that you would not be able to see (or trap). The second diagram (two shapes and a single connector) is a fairly easy code solution in vba. Hopefully a little later in the week I'll take a poke at it.
Happy Easter,
Al

aledlund

Possibly something like this might help to get you started. Rather than write all the event methods I just put a double click call into the events section of the connector. The code then makes sure that the necessary user definitions are in place based on some v2010 functions that Chris discussed in one of his blogs, looks up the end points and makes sure the necessary custom properties are available (updates the input one), and finally relabels the connector. Since the origin can get busy, I labeled the far end.
hth,
Al

jbenfield

That's awesome. Looking through the code, I now realize how far off-base I was.

I can definitely work with this. Thanks!