Displaying the Fill and Line Section Values of a shape

A few years ago, I wrote an article about displaying the RGB value of shapes ( see https://blog.bvisual.net/2010/04/22/displaying-the-rgb-values-of-shapes ). I had forgotten about it, but a reader recently asked if it was possible to force the Foregnd field to display the RGB value for the standard color palette values. For example, red is number 2 in the palette, and has a value of RGB(255,0,0). In revisiting the article, I realised that there is a smarter way to display the values, without the need of any macros.

I simply created a master shape that exposes each of the cells in the Fill and Line sections as Shape Data rows. This allows me to enter values in the Shape Data window and see the effect on the shape immediately. So, it was easy to drop one shape, insert text fields, and then use the Array Shapes tool to layout the shapes. Finally, I just entered the the standard color map numbers 0 to 24 in the FillForegnd Shape Data row.

image

The text block actually contains two rows, both pointing to the Prop.FillForegnd cell (it could actually go direct to the FillForegnd cell instead). The second row of text concatenates a string using the RED(), GREEN() and BLUE() functions.

image

The ShapeSheet is fairly simple and self explanatory:

image

As a nicety, I added right-mouse actions to allow the visibility of the Fill and Line section Shape Data rows to be toggled. Since my original article, the Fill dialog has been replaced with the Format Shape window.

image

The Visio 2013 Version of the file is available here : https://onedrive.live.com/redir?resid=3350D61BC93733A9!396959&authkey=!AHcw1-IzUXpFuLk&ithint=file%2cvsdx

The (untested) pre-Visio 2013 Version of the file is available here : https://onedrive.live.com/redir?resid=3350D61BC93733A9!396960&authkey=!AL3ll-waz7AXqWw&ithint=file%2cvsd

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

davecra.wordpress.com/

Microsoft Office Development, and more...

PowerShell.Amsterdam

Automate, Accelerate, Accurate

johnvisiomvp

Life with Visio and other Microsoft Toys!

Title (Required)

Windows Server Essentials Tips & Tricks

Nilsandrey's Weblog

Just another WordPress.com weblog

Things that Should be Easy

Every so often (too often in the IT industry) I encounter things that should have been very easy to do but turned out to be far too complicated. My favorite topics include SharePoint, .Net development, and software architecture, especially distributed systems.

Visio Guy

Shapes, Stencils, Drawings Templates, Tutorials, Tips & Developer Info for Microsoft Visio

Hannes's Virtual Earth

Tips & Tricks around Mapping and Cloud Computing

Pluralsight blog

be smart, be clear, be visual ...

%d bloggers like this: