yes/no within a conditional formula

yes/no within a conditional formula

arkitek2ss
Collaborator Collaborator
1,695 Views
7 Replies
Message 1 of 8

yes/no within a conditional formula

arkitek2ss
Collaborator
Collaborator

cant seem to figure out yes/no in conditional formulas.  

trying to is this:

if STD and LDR_RIGHT_STD are true, everything else is false

if STD and LDR_LEFT_STD are true, everything is false

if LONG and LDR_RIGHT_LONG are true, everything else is false

if LONG and LDR_LEFT_LONG are true, everything is false

i thought maybe some how the LEFT and RIGHT y/n parameters might come into play but I'm not sure.

 

 

YES-NO.png

 

0 Likes
1,696 Views
7 Replies
Replies (7)
Message 2 of 8

joe_keogh
Collaborator
Collaborator

At a glance you may need a compound IF statement

IF(Criteria, Yes, IF(Criteria, Yes, IF(Criteria, Yes, IF(Criteria, Yes, No))))

Joe Keogh
Director | Design Technology + Innovation
www.viewlistic.com.au

0 Likes
Message 3 of 8

arkitek2ss
Collaborator
Collaborator

What is the correct verbiage to see if a yes no is true. Is it. STD = 1. ?

 

0 Likes
Message 4 of 8

ToanDN
Consultant
Consultant

@arkitek2ss wrote:

What is the correct verbiage to see if a yes no is true. Is it. STD = 1. ?

 


 

0=0 or 1=1 or [any number] = [itself]

0 Likes
Message 5 of 8

arkitek2ss
Collaborator
Collaborator

So if i started a formula like

If (STD=1, 1=1, NOT(STD))

0 Likes
Message 6 of 8

ToanDN
Consultant
Consultant

@arkitek2ss wrote:

So if i started a formula like

If (STD=1, 1=1, NOT(STD))


No.  What expression are you trying achieve in plain English?

 

0=0 or 1=1 is to set a Yes/No parameter to Yes, normally used for the result of a formula.

If you want to say "if the Yes/No parameter is True..." then use: if ([Yes/No parameter name], ...)

 

https://www.revitforum.org/tutorials-tips-tricks/1046-revit-formulas-everyday-usage.html

 

0 Likes
Message 7 of 8

arkitek2ss
Collaborator
Collaborator

Going back last week when you help me with my generic annotations and had a leader coming off  from the note either left  or right  now  I'm trying  to have  another set  of labels that are slightly longer hence the Long and STD for standard.

So if I click on standard and left that the note will show the leader from left side standard length or long and right are sure later coming off the right side with a longer note

 

( this webpage is not smartphone friendly)

 

0 Likes
Message 8 of 8

David_W_Koch
Mentor
Mentor

@arkitek2ss 

 

You have probably worked this out by now, but for the benefit of anyone else coming across this thread, here is my take on what you are trying to do:

 

The end user (the person placing the Generic Annotation) has to choose between Standard or Long, and between Left or Right.  You really only need two input parameters for those two choices, but you can include four if you want users to have visual feedback in the Properties palette when unchecking one of the input parameters.

 

In the images below, the input parameters (I show all four) are under the Other category.  Only LEFT and STD are active; RIGHT and LONG are tied to the choice made by the user for LEFT and STD, respectively.  If the user unchecks LEFT, then RIGHT will show a check mark.  The same is true for STD and LONG.

 

The parameters that will be used to tell the graphics to be on or off are under the Graphics category.  None of these can be edited directly by the user; they are all formula driven.  Only one will be active at one time, based on whether or not LEFT and STD are checked.

2019-09-19_Revit2019_FormulaExample01.png

 

2019-09-19_Revit2019_FormulaExample02.png

 

2019-09-19_Revit2019_FormulaExample03.png

 

2019-09-19_Revit2019_FormulaExample04.png

 

If you do include all four of the parameters shown under Other, you can use the and operator in the Graphics formulas to achieve the same result, like this (I will only show one image here; it works the same as the previous images as the LEFT and STD toggles are checked/unchecked):

2019-09-19_Revit2019_FormulaExample05.png

You may find those formulas easier to read and understand, but they do require having all four of the parameters shown under the Other category.


David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

0 Likes