Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

IF Then Formula with Yes/No parameters reporting text

2 ANTWORTEN 2
GELÖST
Antworten
Nachricht 1 von 3
Anonymous
435 Aufrufe, 2 Antworten

IF Then Formula with Yes/No parameters reporting text

I need some help! I am trying to make an IF THEN formula and everything looks right, but I keep getting the Bad IF-Statement format error. I think the problem is with the Nested Formula formatting.

I am trying to state the following:

  1. If FinEnd_Side_l is clicked then I want this parameter to report an "L"

  2. If FinEnd_Side_ll is clicked then I want this parameter to report an "R"

  3. If both FinEnd_Side l and FinEnd_Side ll are clicked I want this parameter to report a "B"

  4. If neither are clicked this parameter can remain empty.

Here is the formula I have written which gives the error:

 

if((and(FinEnd_Side_l, (not(FinEnd_Side_ll)))), "L", " ", if((and(FinEnd_Side_ll, (not(FinEnd_Side_l)))), "R", " ", if((and(FinEnd_Side_ll, FinEnd_Side_l)), "B", " ", if((not(FinEnd_Side_ll, FinEnd_Side_l)), " ", " " ))))

 

Can anyone help?

Thanks!

2 ANTWORTEN 2
Nachricht 2 von 3
L.Maas
als Antwort auf: Anonymous

This should do it.

if(and(FinEnd_Side_l, FinEnd_Side_ll), "B", if(FinEnd_Side_l, "L", if(FinEnd_Side_ll, "R", "")))

 

You do not have to keep checking with all the and/nots. If a true is found then the formula stops and comes with the result.

Because I already checked if both are true then I only have to look if one is true to come to a conclusion if it should be L or R. I often build these formulas in something like notepad. You have a better overview of your longer formulas

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

Nachricht 3 von 3
Anonymous
als Antwort auf: L.Maas

Thank you. Your response is very appreciated.

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report