Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: Bogardo on March 27, 2012, 02:17:27 PM

Title: Show/hide logo on selection from fixed list
Post by: Bogardo on March 27, 2012, 02:17:27 PM
Hello,

I've made a custom title block that I can insert with an electrical plan made in Visio. When I drag the title block into the page, a pop-up appears where you can choose the manufacturer of the document. In this case e.g. Manufacturer A, B & C. At the moment, the logo of manufacturer A is present in the title block. I need a formula when I choose manufacturer B from the list, the logo of manufacturer B appears and the logo's of the other manufacturers are hidden. The default one should be manufacturer A. Thanks.

Some info:
Logo manufacturer A = Sheet.57
Logo manufacturer B = Sheet.58
Logo manufacturer C = Sheet.59
Title block = Sheet.8
Title: Re: Show/hide logo on selection from fixed list
Post by: wapperdude on March 27, 2012, 07:45:06 PM
If you already have the 3 logos, you can use the selection criteria to change the non-selected logo transparency to 100%, and keep the selected at 0%.  This can be done in the Image Properties section of the shape sheet  for each logo placement.

An alternative method would be to shrink the size of the unwanted logos such that the width and height are nearly zero.

HTH
Wapperdude
Title: Re: Show/hide logo on selection from fixed list
Post by: Bogardo on March 27, 2012, 09:46:03 PM
Quote from: wapperdude on March 27, 2012, 07:45:06 PM
If you already have the 3 logos, you can use the selection criteria to change the non-selected logo transparency to 100%, and keep the selected at 0%.  This can be done in the Image Properties section of the shape sheet  for each logo placement.

I've tried the following code in the Tranperancy section of the shapesheet: IF(Sheet.61!Prop.Manufacturer="Manufacturer1",0%,100%). This does nothing. Can you give me the correct code?
The fixed list consists of: Manufacturer1, Manufacturer2, Manufacturer3.
Title: Re: Show/hide logo on selection from fixed list
Post by: wapperdude on March 28, 2012, 12:52:29 AM
You need to use the strsame function to do the compare. 

Shapesheet functions:  see http://msdn.microsoft.com/en-us/library/ms427031(v=office.12).aspx

Strsame function:  see http://msdn.microsoft.com/en-us/library/ms425572(v=office.12).aspx

HTH
Wapperdude
Title: Re: Show/hide logo on selection from fixed list
Post by: Bogardo on March 28, 2012, 07:50:43 AM
Tank you to point me in the right direction!

For those who want de code:
IF(STRSAME(Sheet.X!Prop.Manufacturer,"Manufacturer A"),0%,100%) ; To be put under Image properties -> Transperancy for the shapesheet of the logo

I also had a Manufacturer's address & contact info to be displayed under the logo. I've used the following code:
IF(STRSAME(Sheet.X!Prop.Manufacturer,"Manufacturer A"),FALSE,TRUE) ; To be put under Miscellaneous -> HideText for the shapesheet of the text block

BB