Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: Michelle on November 26, 2012, 04:14:48 PM

Title: Using Actions to control Shape Data
Post by: Michelle on November 26, 2012, 04:14:48 PM
I found this: http://visualsignals.typepad.co.uk/vislog/2009/09/visio-2010-custom-context-menus.html

And it looks very interesting.  But I want to use it to control the values in my Shape Data.  For example, if the user clicks on a choice at the top of his right click menu... I want it to make that value the one that is chosen in shape data.

I tried this:=SETATREF(Prop.description,"vALUE")
as well as this: =SETF(GetRef(Prop.description),INDEX(1,Prop.description.Format))

But nothing changes in SHape Data... The Shape data section is working.  Currently, the user is placing the shape, then selecting shape data from the right click menu and making their choices.  That is all working fine... Can the Actions menu also work along with SHape data depending on how the user would prefer to make their choices?

Thanks,
Michelle
Title: Re: Using Actions to control Shape Data
Post by: JohnGoldsmith on November 26, 2012, 07:24:52 PM
Hello Michelle,

You're doing the right things.  Using the SETF function you can either push a value or a formula into another cell.  As you've got it at the moment you're pushing the value of the INDEX(1,Prop.description.Format) into the Prop.description cell.  If you added an equals sign then you'd push the actual formula in instead:

=SETF(GetRef(Prop.description),"=INDEX(1,Prop.description.Format)")

Either way you're setting the target cell to a set value.

I've attached an image as an example.



Here's a reference link for more details:

http://msdn.microsoft.com/en-us/library/aa200979%28office.10%29.aspx (http://msdn.microsoft.com/en-us/library/aa200979%28office.10%29.aspx)

Hope the helps.

Best regards

John