Create an Action that changes the Shape Colour on right click

Started by roberm, September 18, 2013, 08:46:25 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

roberm

Hi,  Apologies if this is answered somewhere in the forum, new today to this!!  Also very new to Visio.  I'm using Visio 2013 and need to create some shapes that have a right click action that changes the shape colour.  We have a set of shapes that on right click have about 5 options, each one changes the shape to a different colour.

I am able to use a basic shape (square) create this into my new stencil and add the flyout options on the right click menu.  what I cant seem to work out is how to make these options change the colour of the shape!

I have syntax of something like the below:

Shapesheet for the <SHAPE>
User-defined cells
user.shapeLcolor set as ="RGB(255,0,0);RGB(0,255,0);RGB(0,0,255)" so just simple RED, GREEN, BLUE I have this for FGColor and BGColor also

In the Fill Format section I then have:
FillForegrnd set as =INDEX(User.shapeFGColor,User.shapeFGColor) and the same for Backgrnd, obviously with BGColor

On the Actions section I have:
ActionRow_3 set as =SETF(GetRef(User.shapeFGColor),2) which i thought would pick the second option from the RGB series in user.shapeFGColor but it seems not?  I am clearly missing something really simple and just struggling.  Any help on this would hugely appreciated.

If any of this doesn't make sense, I apologise, as said I am a complete beginner in Visio!!

many thanks


JohnGoldsmith

Hi,

Your FillForegnd cell formula seems to be using User.shapeFGColor as an index and list, but your actual list appears to be in User.shapeLcolor.  Is that just a typo or intended?

Best regards

John

PS - Are you able to attach a document displaying the problem?
John Goldsmith - Visio MVP
http://visualsignals.typepad.co.uk/

roberm

Hi John,

Thanks for coming back to me.. I have spent the afternoon looking at this and have finally worked out where I am going wrong.. I wasn't changing using INDEX in the right Sheet.. I told you I was new to this, in fact its 2 days of Visio use now!!! Surely I should of started with something easier..

I simply had my refs as you suggested wrong... now I have that sorted my shape is changing colour nicely

Thanks again.. I maybe back.. Who'd a thought VISIO was so complex!!!  :)

JohnGoldsmith

Great - glad you're all working.  If this is day two then I imagine you'll be pretty handy after a week!

There's a ton of resources out there, but in particular have you spotted:

Developing Visio Solutions

and within that:

Elements of Visio Formulas

Look forward to meeting you again.

All the best

John
John Goldsmith - Visio MVP
http://visualsignals.typepad.co.uk/

roberm

Cheers John, great links, not seen those yet..  Seems I have a lot of reading to do :)

Onwards with this new Stencil, now to work out how to assign text from a list to my shape from a right click menu!!

Thanks again :)