Thursday, November 10, 2005

Make Up My Mind

Toggle Several Parameters At One Time

With Revit’s Yes/No parameter data type it is very easy to toggle two parameters using the statement: Not(Option A) in the formula field for Option B. Un-checking Option A checks Option B automatically. Checking Option A un-checks Option B automatically too.

It isn’t so straightforward to apply the same concept to multiple check boxes. Let’s say we’d like to have four options and only one of them should be visible at a time. These objects require their own yes/no parameter to make them visible or not. To decide which option is visible we’d like to just check the option we want and see the others unchecked automatically.

Here’s one way you could accomplish this. Let’s say we have one parameter using the integer data type, called Choose Option. We also have Option 1,2,3 and 4 parameters (yes/no data type) to assign to the objects involved. If we just add a formula to each option parameter that determines whether it is yes/no we can toggle our choice very quickly, with one data entry.

Is it almost as quick as checking a box? Pretty close!

One little side effect, if you enter a value that doesn't have a corresponding option...nothing is visible and you turn off all options! Good, bad? You be the judge.

9 comments:

Jim Balding said...

I was pullin gmy hair out over this need, I submitted to Autodesk and they said it was not possible... I knew it was somehow. Thanks SKS II -

- JB

Randy Sharp said...

I ran across this in making a furniture family with setting up multiple seating arrangements. Your findings confirm what I was running accross. Is it so much work to simply check off the ones we do not want to show? I didn't think so. I haven't had a chance to use the family in a real project and didn't get as far as scheduling implications though.

Anonymous said...

Nice tip Steve! Now if you set up Family Types in your family, and assign "1" to "Choose Option" in "Family Type 1" and "2" to "Family Type 2", etc. Then your users need not enter any value...just use the pull down and select the right type! - From Scott Davis, posting anon....

Anonymous said...

Seems to me if you were going to make all these be type param's anyway, this is a bit of extra work. If users are simply selecting from the drop down, then there is little risk of accidentally having multiple options checked simultaneously, and so the regular check boxes would be fine.

David Fannon, Posting anonymously

Anonymous said...

Hi Steve,

I was directed to this post based on something I posted on AUGI. I'm trying to apply a family parameter so I can swap nested families within a parent family. Once I create the label, create the types and when I try to set my new type to another nested family - the constraints and dimensions break. I was advised to use visibility parameters to turn my various objects on and off and use your method to take on many of these objects - but there has to be a better, more elegant way right?

Here is my original post:
http://forums.augi.com/showthread.php?t=59950&highlight=applying+family+parameter

Please let me know what you've think - I've been struggling to get this to work with no luck.

Steve said...

Replied to the thread at AUGI regarding the Family Type parameter and problem family.

Regarding "more work"...it is just an option to consider, use it or not 8-)

Jj Mac said...

Thanks Steve! You just saved my day!

Robert Catmull said...

You can also Create a default value you would like to revert back too by setting Option 5 which formula would = Choose Option > 4

So any number selected above that number would revert to the default or make a error message if it's an annotation.

Anonymous said...

Is it possible to get this to work based on Scale? Such that if the scale of a view is X then parameter 1 will be on, etc...