Nested IFs doesn't work with Key Schedule Parameters

Nested IFs doesn't work with Key Schedule Parameters

PedroAndruccioli
Enthusiast Enthusiast
787 Views
2 Replies
Message 1 of 3

Nested IFs doesn't work with Key Schedule Parameters

PedroAndruccioli
Enthusiast
Enthusiast

Hello.

 

I'm making a simple code where if a yes/no parameter is filled in a Key Schedule, it returns a equation dividing the Room Area by a fraction, giving me the minimum ventilation area by City Standards. The previous Schedule had native fields (filled manually), but I'm upgrading it to change only the key schedule type, and give all the other results automatically.

 

The problem: The previous code worked fine. This new (changing the name of the parameters, nothing else) only gives me the result of the first condition (P / FP on this case). If i change the key schedule to the next true statement (T / FT), it leaves a blank cell.

 

Any suggestions?

 

Thanks in advance.

0 Likes
Accepted solutions (1)
788 Views
2 Replies
Replies (2)
Message 2 of 3

PedroAndruccioli
Enthusiast
Enthusiast

I was able to solve by myself.

 

When the key shedule was created, the unchecked boxes didn't return "No", instead were grayed, which I assumed was the same.

 

Just checked and unchecked again, it reported "No", and it all worked fine.

 

Just gonna leave here if someone have the same problem.

 

Cheers.

0 Likes
Message 3 of 3

GaryOrrMBI
Advisor
Advisor
Accepted solution

Just for your future reference (and any others that may need this info)...

 

When you use Project Parameters to assign parameters to everything in a given category (or categories) Revit does assign the parameter but, especially in the case of a yes/no parameter, it is "uninitialized" (shown as greyed out in the UI and not reported as an actual assigned value).

Your first click on the checkbox "initializes" the parameter (or turns it into an actual live and usable value).

Your second click on the value flips it from the initial checked (yes) value to unchecked (no) value.

 

I often overcome this issue (it has been here since day one) by building formulas that work on double negatives where I can, but that logic gets convoluted pretty quickly sometimes..

 

Just my added two cents,

 

-G

Gary J. Orr
GaryOrrMBI (MBI Companies 2014-Current)
aka (past user names):
Gary_J_Orr (GOMO Stuff 2008-2014);
OrrG (Forum Studio 2005-2008);
Gary J. Orr (LHB Inc 2002-2005);
Orr, Gary J. (Gossen Livingston 1997-2002)
0 Likes