Change shape fill and text parameters based on another shapes data variables

Started by Budgie, July 20, 2016, 05:49:16 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Budgie

Guys,
I've done some searching and found a few articles discussing the kind off thing I want to do but have so far not found the short answer.

I have a set of standard shapes for a process I use and I'd like to simply and quickly define the fill colour and customer name for the entire visio file and then have all my shapes updated to reflect that.  I was thinking of using a master shape, lets call it "input shape" and it's shape data to achieve this as follows but can't make it work.

I have standard shapes (which are spread across different sheets/pages in the same visio file) which have a 'fill colour' and 'text' displaying the customers name.  What I want to achieve is via another "Input shape" and using this shapes shape data enter a 'customer name' and 'colour' (I assume in hex values?) and when I do the fill colour and text displayed in all my other shapes are updated to the values specified. 


If there's a better way to achieve this I'm all ears

Note I'm using Visio 2016

Cheers Tony

JuneTheSecond

Best Regards,

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

Hey Ken


Budgie:

   I do that all the time for font and font size in my drawings, and the technique is directly transferrable to what you're trying to do.  What you call an "input shape" I call a "hot shape", because whatever font and font size I put there is automatically replicated everywhere.  Best of all, it doesn't need any VBA to work.  Check out something I posted here several years ago: http://visguy.com/vgforum/index.php?topic=4555.msg17819#msg17819.  Where I use Char.Size, you can use FillForegnd, but the text part is a bit more complicated.  You'll need to insert a text field with a custom formula that points to the text of your hot shape, something like TheDoc!User.CustomerName which your hot shape can initialize via its TheText event.

   Good luck!

   - Ken


Ken V. Krawchuk
Author
No Dogs on Mars - A Starship Story
http://astarshipstory.com

Budgie

Thanks guys, I managed to get this working via the SetAtRef function for both text and the shape colour (FillForegnd)

Cheers Tony