Hi All,
Newbie here trying smartshapes AND getting very frustrated. I am trying to toggle the 3 dip switches on the circuit board as seen below and attached. I am trying to use "IF" and "OR" to toggle the FlipX field on the individual shapes. HELP! I am ready to dump this program. :-)
All the shapes in that document have been ungrouped! Assuming you got the DIP switch from this forum then ungrouping the shape will break it. Permanently.
Try this file... it's all grouped together with custom properties. Thanks.
but regrouping them doesn't repair them.
It's my original file. I haven't de-grouped and re-grouped them. It was done on Visio 2003 as well if that makes a difference. I find the developer documentation for Visio to be minimal at best. MS needs their knuckles cracked for this.
I'm trying to use "=IF(OR(Sheet.94!Prop.INPUT="0-20 Ma",Sheet.94!Prop.INPUT="4-20 Ma"),1,0)" and related IF functions to turn on (flip to the right... "TRUE" (1)) position. But it's taking it as being TRUE all the time.
Check out this post: http://visguy.com/vgforum/index.php?topic=711.0
Go to the bottom of the thread for the latest version which includes 3 different instantiations of the DIP switch:
1. Right click to bring up a menu to select open / closed for each switch
2. VisioGuy's adaptation which uses a binary work to set the switches
3. Simple mouse to drag control points to set the switch state.
These can be used as is, or, you can examine how they're built to create a custom number of switches.
HTH
Wapperdude
I saw those. Thanks.
My question/concern is more akin to the "IF" function coding and if I'm doing it right. I am not an experienced coder at all.
My version uses custom properties (various V/mA input values to drive a variety of dip switch configurations.
.
The comparison in the IF statement might work better if you use the string same function. Check out this reference: http://msdn.microsoft.com/en-us/library/aa431851(v=office.12).aspx
Wapperdude
No, that doesn't do it at all. My 5 variables are all unique.
Care to post a sample -- more than just the IF statement?
Ooops. Sorry. Just remembered you did post examples.
OK. Try this syntax: =IF(OR(STRSAME(Sheet.94!Prop.INPUT,"0-20 mA"),STRSAME(Sheet.94!Prop.INPUT,"4-20 mA")),1,0)
Should work.
Wapperdude
Edit: updated formula to correct capitalization errors on mA in the provided formula.
Super. Just need a fix up for the "S1" switch which has 3 conditions. what did I miss here as this doesn't sem to work...
=IF(OR(STRSAME(Sheet.94!Prop.INPUT,"1-5 Vdc"),STRSAME(Sheet.94!Prop.INPUT,"2-10 Vdc"),STRSAME(Sheet.94!Prop.INPUT="4-20 mA")),1,0)
Syntax error:
IS: Sheet.94!Prop.INPUT="4-20 mA"
S/B: Sheet.94!Prop.INPUT,"4-20 mA"
The Wapperdude saved my bacon. Thanks!
.
;)