Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Revit multiple If function

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
Mat.Syaf
471 Views, 5 Replies

Revit multiple If function

Hi, I need a help with the IF function. 
Here is are the situation,


(If No of Mod is 1)

If End Gable_Left is tick, No of Gable should be 1

If End Gable_Right is tick, No of Gable should be 1

If both End Gable_Left & End Gable_Right are tick, No of Gable should be 2

If non is tick, No of Gable should be 0

 

(If No of Mod is 2)

If End Gable_Left is tick, No of Gable should be 2

If End Gable_Right is tick, No of Gable should be 2

If both End Gable_Left & End Gable_Right are tick, No of Gable should be 3

If non is tick, No of Gable should be 1

 

(If No of Mod is 3)

If End Gable_Left is tick, No of Gable should be 3

If End Gable_Right is tick, No of Gable should be 3

If both End Gable_Left & End Gable_Right are tick, No of Gable should be 4

If non is tick, No of Gable should be 2

 

until now, if No of Mod is 2, I able to make No of Gable turns 2 if either Left or Right is tick. But if both Left and RIght is tick, the No of Gable is still 2, not change to 3. 😖

 

MatSyaf_0-1658119893269.png

MatSyaf_1-1658119925568.png

MatSyaf_2-1658119951433.png

MatSyaf_3-1658119977768.png

 

 

Labels (3)
5 REPLIES 5
Message 2 of 6
barthbradley
in reply to: Mat.Syaf

AND Conditional Statements:  

 

if(and(End Gable_Left, End Gable_Right), 2, if(and(not(End Gable_Left), not(End Gable_Right)), 0, if(and(End Gable_Left, not(End Gable_Right)), 1, 1)))

 

End Gable.png

 

More info here to help you: 

 

https://www.revitforum.org/node/1126

 

Note the OR Conditional Statement as well.  It's constructed the same way as the AND Conditional Statement.  

Message 3 of 6
ToanDN
in reply to: Mat.Syaf

if(and(End Gable_Left, End Gable_Right), No of Mod + 1, if(or(End Gable_Left, End Gable_Right), No of Mod, No of Mod - 1))

Message 5 of 6
Mat.Syaf
in reply to: barthbradley

noted on the linked. Thanks for the help !
Message 6 of 6
Mat.Syaf
in reply to: ToanDN

perfect! Thanks bro!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Autodesk Design & Make Report