Two-Way Shape data to Shape text connection

Started by phillip_141, May 15, 2015, 07:12:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

phillip_141

Hey guys, I am a fairly new visio user but I started creating smartshapes with the shapesheet window pretty quickly after finding out about it. I'm currently stuck on a particular problem though and don't know how to proceed. I've been trying to create a two-way link between a shape's text and shape data. I know that SETATREF will create a two-way link (really it just pushes edits to the referenced cells but whatevs) between two cells but I can't seem to get it to work with the text. I also know that SHAPESHEET(TheText) can get the text and put it into the shapedata, but this seems to be a one-way street.

Has anyone tried anything similar? Any ideas on what I could/should try next?

Edit: I have Visio pro 2013

Thanks all,
Philllip_141

Yacine

#1
TheText is indeed a one way solution, as it can contain more, than a cell in the shapesheet can hold, namely formats.
I think the fastest would be to use VBA.

I also think having seen a tool from Visio Guy doing that exact same job. Not sure, but you may browse the tools in the web page section of Visgug.com.
Yacine

vojo

Having wrestled this 5 years ago (no real luck), the root problem is that shapes can not "discover" each other when dropped
(if 2 shapes in a group - thus known relationship - this is easy:  Each can write things into the other using SETF)
But 2 shapes with no predefined relationship is much tougher since the shape can not figure out the others name on the sheet.
Even if you put some sort of "shape map" in the page shape, using SETF without GETREF() may give incorrect results (wrong shape used).

In a limited fashion, you can do this
- create user cells in the page shape   I.e. user.comm1 and user.comm2 and user.comm1used and user.comm2used
- Shape Y sets its shape ID in user.comm1used writes things into page!user.comm1
- Shape X reads page!user.comm1 because it tested all the user.comm<x>used cells to find the shape of interest
- vice versa for the other direction using comm2

This is limited because
- need to know how many comm channels you need apriori
   (maybe have a pool of comms....when shapeY reads the data, it then clears user.comm<x>used so its free for others)
- The special page shape would push this into a template vs drawing
   (might be able to play some games with background page or legend or special "comm" shape...but dont think it will work)

VBA is a better way to go (still drives to a template...but more flexibility).