Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: scott on May 15, 2008, 06:49:27 AM

Title: Hide subshapes based on either of two flags
Post by: scott on May 15, 2008, 06:49:27 AM
Chris,
I recently reread your 2006 post about various ways to hide shapes. My question is a variation on that theme.

Basic situation: a group with several subshapes. Certain subshapes can be hidden in one of two ways: by setting a flag on the group or by setting a flag on the page.

Page flag: User.pgHideSub

Group flag: User.grHideSub

Subshape formula in Geometry1.NoShow: OR(<group>!User.grHideSub, ThePage!User.pgHideSub)

This setup works fine and hides the subshape if either flag is set to TRUE.

And now for the question: If the user sets the page flag to FALSE, I want to force User.grHideSub to FALSE as well. I can do this by creating another group cell called User.Watch_pgHideSub with a value of
     IF(ThePage!User.pgHideSub=FALSE,SETF(GetRef(User.shHideSub),FALSE),"")
While this works, is there a more elegant way that doesn't require the "watch" cell?
Title: Re: Hide subshapes based on either of two flags
Post by: Visio Guy on May 15, 2008, 07:29:48 AM
Hi Scott,

Yeah, I know what you mean. Too many SETFs starts to feel weird.

One technique I used to use was to put a setting on the shape to "Use Page Setting", and had that as the default. So if you hide something via the shape, then it is an override of the page setting, and won't listen to the shape. But if you revert to "Use Page Setting", the shape is again a team player.

Not quite as flexible or powerful as yours, but slightly less 'icky'