PDA

View Full Version : return a yes/no parameter to unselected state



Eric Stewart
2009-06-11, 12:00 PM
Is it possible to return a yes/no param to an unselected state after clicking it? Instead of having the schedule say either yes or no, we just want it to be blank.

twiceroadsfool
2009-06-11, 01:33 PM
I dont believe you can change ANY field back to "null" once its been clicked in... (besides a text field)

DaveP
2009-06-11, 02:15 PM
On a semi-related issue:
I wish that the icon would not show as checked when it is unselected.
Yes, it is greyed out, but the icon has a check inside the box, which some people interpret as "Yes, but not available".

I'd prefer to see:

Unselected: Box is greyed out and unchecked.
No: Box is unchecked.
Yes: Box is checked.I don't know if that's a Microsoft standard or an Autodesk implementation, but don't you think having the box checked is misleading when it does not yet have a value?

Scott Womack
2009-06-11, 03:39 PM
By it's very defition, a Yes/No parameter cannot have an "unselected" state. It is either Yes, or No. No other value is possible.

DaveP
2009-06-11, 03:50 PM
Sorry, Scott, but those images I posted were directly from Revit.
You CAN have a parameter be Unselected.
Go to Project Parameters and add a new parameter. Make it apply to all categories. Then pick anything, and you should see that parameter show up with the checkbox greyed out (and checked). This is the unselected state.
The Unselected state can force you into some unusual logic in formulae, Since Unselected is not the same as No. I've got several formula that have to say If (not(No)) instead of If (Yes) because of this very issue.

Once you have selected a value, you cannot change it back to Unselected.

Scott Womack
2009-06-11, 03:58 PM
Sorry, Scott, but those images I posted were directly from Revit.
You CAN have a parameter be Unselected.
Go to Project Parameters and add a new parameter. Make it apply to all categories. Then pick anything, and you should see that parameter show up with the checkbox greyed out (and checked). This is the unselected state

I just tried what you stated with a Yes/No parameter (in 2010) and it automatically gave this parameter a Yes value. Other types of parameters can have the "Unselected state", but not a Yes/No type of parameter. The OP was referring specifically to a Yes/No type of parameter.

aaronrumple
2009-06-11, 04:26 PM
By it's very defition, a Yes/No parameter cannot have an "unselected" state. It is either Yes, or No. No other value is possible.

Actually they do - when initialized by revit they are all nil (or null) and in a state of "nothingness". They are neither 1 or 0 but just blank. You can see this if you make a schedule of a project parameter using yes/no. This appears as a checkbox of course. Now create a calculated field and just set it equal to the yes/no parameter. You'll see that for all items that have not been set - the calculated field is blank. Other fields will either show a yes or no.If you make a caclulated value using IF(Parameter, X,O) you'll see that Yes conditions are set to X and no conditions are set to O and unslected items are blank.

So Revit knows about the null condition. It just can't be cleared and returned to its original state of "nothingness". It would be very helpfull to have a null condition since this would let you do nice matrix schedules where you could have X, O and blanks in a grid. But right now when set to X or O - it can never be blank again.

(I haven't looked at 2010 to see if this can be done with the API.)

DaveP
2009-06-11, 07:27 PM
You beat me to it Aaron!
I made another example with the same concepts, but a different implementation.
I made a Parameter, and then made filters that change the color based on that parameter. One filter if it = "Yes" and another if ="No". Drew three walls, and left one with the Parameter unSelected, one with it checked Yes, and one with it Set to No.

As you can see in the image, the Unselected wall is not changed in either the "Yes" View or the "No" View.

patricks
2009-06-11, 07:42 PM
Yes this would be nice to return it to "unselected". We have a yes/no parameter to indicate double doors. In our schedule, the Pair field is blank, except for double doors which have the parameter checked, in which case the field returns Yes.

It's much easier when reading the door schedule to distinguish between single and double doors, since single doors are just blank in the Pair column. If you accidentally check a single door as Yes for pair, then unselect it, it then shows No in the column. If every door had either Yes or No in that column, it would be much more difficult to pick out the double doors in the schedule.

twaldock
2009-06-11, 11:08 PM
Conversely, is there a way to automatically get a calculated yes/no field to be either yes or no in all instances when it is created? I agree that sometimes it is good for them to be in a null state by default (even if the box is ticked & grey). BUT, if you want most of them to be yes, you have to laboriously click on each one, usually 3 times - once to select and activate the check box, second time to get a value into it, third time to get the correct value.
And then when new instances are created, you have to revisit the schedule (or properties) to activate the null field.