How do I hide shape 2 by making a selection on shape 1

Started by ThirdDimension, November 19, 2015, 04:05:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ThirdDimension

I would like to show / hide shape 2 by changing shape data on shape 1.

I have added a shape definition as a prop.row and set the values to YES;NO.  I am not sure how or where to embed the code.

thanks for all your help and patients I am still learing!!!

3rd D

Surrogate

Describe please your shape that you need show or hide, what is it: single shape with one geometry section, ingle shape with few geometry sections, group of shapes, OLE-object or something else ?

simple case is single shape with one geometry section. Open ShapeSheet Window find Geometry section, in field NoShow place formula


Geometry1.NoShow=sheet.<ID of referenced shape>!prop.row

Surrogate

For group shapes and OLE-objects i prefer hide them via layers

Yacine

@Surrogate, whenever someone asks for hiding a shape I usually refer to http://www.visguy.com/2006/09/05/the-hidden-world-of-visio-shapes/
This covers most of the available options.
Yacine

ThirdDimension

Thanks for your help everyone.  I read the article and I made a little progress so here is an update.

1)  I configured two layers on the page, layer ONE is set to visible and layer TWO is set to invisible

2)  I set up a "YES" or "NO" shape data option on BOX 1, then configured Box 2 Layer membership with the following equation: =IF(Sheet.1!Prop.Box2="YES",0,1)

Now, when I select the Box ONE "NO" option, Box TWO disappears, however, when I set Box ONE back to "YES", I cannot get Box TWO to reappear.  So the "hide" works once, and then

Does anyone have more recommendations?

Thanks in advance

3rdD

wapperdude

If sheet.1 is the controlling shape, and Box1 is setting the visibility, then, your if statement should be Sheet.1!Prop.Box1  not Prop.Box2.

Wapperdude
Visio 2019 Pro

Yacine

The answer is: never ever use if(field = string, ...
That's a logical choice but it does not work in Visio.
Instead, use: if(strsame(field,string), ...
Yacine

ThirdDimension

i tried a slightly different approach.

This did the trick.

Thanks!!!!!