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,
Solved! Go to Solution.
Solved by stefan_gokstorp. Go to Solution.
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.
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.
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
use nestled families and a type parameter for the handles thats controlled on type level, also on
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)
@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
@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?
@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.