Shape Studio -> Developing my own User-defined Actions

M

Matt Fisher

Shape Studio -> Developing my own User-defined Actions

In the past few months I have been playing with Visio Shape Studio a lot. I have mostly b=
een doing shape manipulation and multi-state stuff via the shape sheet. When I make a=
multi-state on a shape there is a row added in the =E2=80=98User-defined Cells=E2=80=
=99 section (the row is called User.visSSMultiState). When I change this value shap=
es appear and disappear based upon what I set in the multistate wizard when this was cr=
eated.

My Questions Is: How do I set up user-defined cells that when the value is changed some=
thing happens. It appears that this value in the user-defined cell is calling some fu=
nction. So how do I access that?

Thanks so much,
Matt.
 
M

Mark Nelson [MS]

Most of the time its the other cells that react to a change. It is far more
rare for a cell to initiate a change in other cells.

Let's say that I have a sub-shape that is supposed to appear when my User
cell is set to 1 and disappear when it is set to 0. You would put a formula
in the sub-shape's Geometry1.NoShow cell like this:

=IF(Sheet.5!User.MyState=1,False,True)

Sheet.5 should be the Sheet.ID of your top level shape. User.MyState is the
cell that holds the 1 or 0. The sub-shape has a formula that depends on the
value in your User cell, so it recalculates whenever the User cell value
changes. The "action" here is a result of Geometry1.NoShow switching from
False to True.

On occasion you want to push a value into another cell. This is done
through the SETF function. The most common place this is done is in the
Action cell of an Action row. Let's say you want to have a right-mouse menu
action that toggles the visibility of your sub-shape. In the
Actions.Row_1.Action cell you could put this:

=SETF(GETREF(User.MyState),NOT(User.MyState))

The GETREF function specifies the cell that you are setting the value for.
The second parameter is the value you want to set. In this case the User
cell is toggled. Then use the formula you created in the sub-shape above to
complete the behavior.

Once you get the basics down, you might explore some of the more
sophisticated functions for creating custom behaviors on shapes. Find a
Visio shape that does something interesting and look at its Shapesheet for
insights. Also check out functions like BOUND and SETATREF.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

Shape Studio -> Developing my own User-defined Actions

In the past few months I have been playing with Visio Shape Studio a lot. I
have mostly been doing shape manipulation and multi-state stuff via the
shape sheet. When I make a multi-state on a shape there is a row added in
the 'User-defined Cells' section (the row is called User.visSSMultiState).
When I change this value shapes appear and disappear based upon what I set
in the multistate wizard when this was created.

My Questions Is: How do I set up user-defined cells that when the value is
changed something happens. It appears that this value in the user-defined
cell is calling some function. So how do I access that?

Thanks so much,
Matt.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top