PDA

View Full Version : Yes/No Conditional



thredge
2008-10-24, 02:47 PM
I was trying to use 2 check boxes in a family for a visibility prameter, and attach them together so when one was on, the other was off (Only really need it to be one directional though)

The problem I am having is I don't understand how to make a conditional statement to have one parameter be off when the other is on. The help file didn't really say with the list of the other parameters.

I can do "Param2 = Param1" and wonderful, when param 1 is off, param 2 follows suit. But not sure how to do the oposite. Tried some things like "Param2 = If (Param1, false, true)" or "Param2 = If (Param1, off, on)" but those things aren't recognized. I'm sure I'm just missing something simple.

DaveP
2008-10-24, 03:25 PM
Yup, it is pretty simple
You need to set the second parameter to:
not(Param1)
Think about which one you choose to be the "not". It will show up as greyed out & you'll need to use the other one (Param1 in my example) as the one you click.

That's exactly what we've got for our doors. We have two parameters - New and Existing - that control the graphics. Since it makes more sense to says if it's Existing rather than New, we set New to not(Existing).

cadman6735
2008-10-24, 06:31 PM
can this be done for more than two yes/no conditions?

DaveP
2008-10-24, 07:06 PM
If you mean like a radio button where you can only pick one out of 5 options, no, you can't do that. At least not easily. You might be able to do some sort of convoluted, nested formula like
if(Param5,Param5,if(Param4,Param4,if(Param3 etc, etc, etc
but that's still not going to turn off the others. It's just going to end up with one value if none of the rest are on.

cadman6735
2008-10-24, 08:16 PM
I am all about "convoluted". :-)

Thanks

Munkholm
2008-10-24, 09:08 PM
If you mean like a radio button where you can only pick one out of 5 options, no, you can't do that. At least not easily. You might be able to do some sort of convoluted, nested formula like
if(Param5,Param5,if(Param4,Param4,if(Param3 etc, etc, etc
but that's still not going to turn off the others. It's just going to end up with one value if none of the rest are on.

Have to disagree on that one - Steve solved the puzzle on his blog right here: http://revitoped.blogspot.com/2005/11/make-up-my-mind.html
This will get a bunch of "yes/no parameters" to act like "radio buttons"

DaveP
2008-10-27, 01:50 PM
Nice find, Munkholm!
Once again, Stafford to the rescue!

'twould be nice,though, if we could have a "List" type in addition to Integer, number, Text, etc.
I could see using a pre-built list in many places. For example, in our Door Families, the Frame Material is ALWAYS one of the following:

HM
WD
AL
SST
FireRating is always:

20
45
60
90
120
I'm sure you all could think of a dozen other examples.

sbrown
2008-10-27, 01:59 PM
Those lists would all be possible with key schedules, just make a key schedule with whatever typical values you want, then add that field to your primary schedule and those choices will be available.

tomnewsom
2008-10-27, 02:01 PM
Except, of course, that you can't use Shared Parameters in schedule keys :mad:

DaveP
2008-10-27, 02:16 PM
And I found, much to my chagrin, that you can only use a parameter in one Key Schedule.
Makes sense why, but it does limit you.
I figured, once upon a time, that I could do just what you suggested, Scott. I made a Key Schedule that had only my Frame Material, and another that had only my Fire Ratings. Worked great until I wanted to use a Key Schedule for their intended purpose (typical styles of doors) and found that none of those fields were available.

thredge
2008-10-29, 07:09 PM
Wow, I was going to post that this worked great, and thanks to DaveP's first reply, but looks like I waited to long and the thread blowupchuated. Anyway, thanks, Dave, exactly what I needed. I'll have to check out the radio button thing later some time to see what we could us that for too.