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: 

How to merge AND and OR condition in Revit?

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
mahanmotamedi1991
398 Views, 7 Replies

How to merge AND and OR condition in Revit?

Hello Everyone,

 

I'm facing a situation where I need to simultaneously set a condition comprising AND and OR conditions. Is there any way to set such conditions in Revit?

 

For example somthing like this : if(or(and(1_Vantail,Poignee_Visibilité),and(2_Vantaux,Poignee_Visibilité),True,False)

 

Best,

 

7 REPLIES 7
Message 2 of 8

And means all conditions are true
OR means any condition are true 

dont understand why you would need to combine them 
but what you could do is add an extra parameter for instance something like this.

stefangokstorp_1-1664369250118.png

stefangokstorp_2-1664369274661.png

stefangokstorp_3-1664369340033.png

stefangokstorp_5-1664369514491.png

 

where s2 = true if either type 1 is checked or type 2 is not
s1 = true when s2 is checked and type 3 is checked.

in other words create a new parameter that is controled by OR function and incoperate that parameter  in to the forumla that is controlled by AND formula.

recommend looking at pictures and setting up a test after them to proper understand it having proplem explaining myself.

Message 3 of 8

Thank you for your reply. I'm working on a door family. I want to have an option for the number of leaves. (1 leaf or two leaves). I have a separate door handle for each case (1 leaf or two leaves). Therefore I want to make a visibility parameter for the door handle, and I have two conditions:
1- if the Door is one leaf and the door handle visibility is "true, " show the door handle.
2- if the Door is two leaves and the door handle visibility is "true", show the door handle.

So I thought the best is to set a condition with AND and OR like this:

IF(< Door is one leaf AND Door handle visibility is on>, <Show the door handle>, <Hide the door handle> OR < Door is two leaves AND Door handle visibility is on>, <Show the door handle>, <Hide the door handle>).

I'm sorry if I'm not so clear. It is a bit hard to explain this issue clearly.

Best

Message 4 of 8

use nestled families and a type parameter for the handles thats controlled on type level, also on

stefangokstorp_1-1664372781538.png

 

 

from project im working on the handle are nestled family if its a inner door use one handle if its a double use the other one (number 1 on picture) and also the leafs are controlled in the same way nested families loaded in to your door family and controlled on type level via type parameter (number 2 in picture)

Message 5 of 8
ToanDN
in reply to: mahanmotamedi1991


@mahanmotamedi1991 wrote:

Thank you for your reply. I'm working on a door family. I want to have an option for the number of leaves. (1 leaf or two leaves). I have a separate door handle for each case (1 leaf or two leaves). Therefore I want to make a visibility parameter for the door handle, and I have two conditions:
1- if the Door is one leaf and the door handle visibility is "true, " show the door handle.
2- if the Door is two leaves and the door handle visibility is "true", show the door handle.

So I thought the best is to set a condition with AND and OR like this:

IF(< Door is one leaf AND Door handle visibility is on>, <Show the door handle>, <Hide the door handle> OR < Door is two leaves AND Door handle visibility is on>, <Show the door handle>, <Hide the door handle>).

I'm sorry if I'm not so clear. It is a bit hard to explain this issue clearly.

Best


A simpler way is:

- create a nested family for 1-leaf, nest in the handle for 1-leaf

- create a nested family for 2-leaf, nest in the handle for 2-leaf

- nest them in your door and create a Family Type parameter to create a dropdown selector

Message 6 of 8

Thank you very much for your guidance.

Message 7 of 8


@mahanmotamedi1991 wrote:

Thank you for your reply. I'm working on a door family. I want to have an option for the number of leaves. (1 leaf or two leaves). I have a separate door handle for each case (1 leaf or two leaves). Therefore I want to make a visibility parameter for the door handle, and I have two conditions:
1- if the Door is one leaf and the door handle visibility is "true, " show the door handle.
2- if the Door is two leaves and the door handle visibility is "true", show the door handle.

So I thought the best is to set a condition with AND and OR like this:

IF(< Door is one leaf AND Door handle visibility is on>, <Show the door handle>, <Hide the door handle> OR < Door is two leaves AND Door handle visibility is on>, <Show the door handle>, <Hide the door handle>).

I'm sorry if I'm not so clear. It is a bit hard to explain this issue clearly.

Best


 

 

Based on what you are saying here, it sounds like the Door Handles are visible whenever the Door Handle's Visibility Checkbox is checked.  I don't see how it's contingent or differs based on number or Door "leafs".   What am I missing?  

Message 8 of 8
ToanDN
in reply to: mahanmotamedi1991


@mahanmotamedi1991 wrote:

Hello Everyone,

 

I'm facing a situation where I need to simultaneously set a condition comprising AND and OR conditions. Is there any way to set such conditions in Revit?

 

For example somthing like this : if(or(and(1_Vantail,Poignee_Visibilité),and(2_Vantaux,Poignee_Visibilité),True,False)

 

Best,

 


By the way, the formula should be like this:

 

if(or((and(A, C)), (and(B, C))), 1 = 1, 1 = 0)

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