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

Revit Conditional Statements - IF _ AND _ OR

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
Anonymous
4763 Views, 7 Replies

Revit Conditional Statements - IF _ AND _ OR

Hi Guys,

 

I have a challenge for you! I need to create a formula for revit to check the following logic…

 

I place air terminals at a 90° directly on round ducting… I then size the duct according to sizing methods in revit… I then need to rotate the air terminal on the duct according to figure 1…

 1.jpg

Figure 1

I created the family to control the ANGLE parameter to check the size of the duct (User input) and then apply the correct ANGLE using the formula below;

 

            if(Diameter = 400 mm, 30°, if(Diameter = 500 mm, 37°, if(Diameter = 630 mm, 39°, if(Diameter = 710 mm, 42°, if(Diameter = 800 mm, 45°, if(Diameter = 930 mm, 47°, 90°))))))

 

So the formula states… if user input for diameter is 400 then change angle to 30 if true or return the value 90 if false, and as you can it repeats itself for multiple angle values.

 

and the above works pretty well until I need to place air terminals in a mirrored position as shown in Figure 2. Now I need to verify two values before returning the proper angle.

 

 2.jpg

Figure 2

The logic is… please check if user checked the check box called IS MIRROR and check if user input for DIAMETER equals 400, if this is true then angle will be 150 else the angle is 30. So I managed to write the following formula;

 

            if(and(Is Mirror, Diameter = 500 mm), 157°, 37°) and this will be repeated to include all the angles

 

but now and this is where the challenge comes in…If diameter is not one of the sizes in Figure 1 then the angle should be 90 by default.

 

If this makes at all sense to you then I would appreciate if you can help me out on this one it is busy giving me sleepless nights. The images below shows the revit family parameters and I attached the family…

 

Please note the user input is only on IS MIRROR and DIAMETER.

3.jpg

 

7 REPLIES 7
Message 2 of 8
Anonymous
in reply to: Anonymous

Hi i managed to get the formula right!!!!

 

if(and(Is Mirror, Diameter = 400 mm), 150°, if(Diameter = 400 mm, 30°, 90°))

 

My diffuser family works like a charm

Message 3 of 8
Anonymous
in reply to: Anonymous

Can you look at this statement and tell me why I'm getting an error?  Says "Bad IF-statement format.  Thanks.

 

if(and(not(Trapeze_Rod_Center), not(R2_Custom_Length)),0,if(and(Trapeze_Rod_Center), not(R2_Custom_Length),Trapeze_Rod_Length_1,Rod2 Custom Length))

Message 4 of 8
srey.chhoeun
in reply to: Anonymous

hi Gary

Im just new to this whole formula thing and sound like you are the man to go to.

Im trying to set a condition for my voids object to a certain depth if the other solid object visibility is ticked.

but i couldnt find the right formula for this. would be great if you could help me out

sreychhoeun_0-1652398243113.png

 

Message 5 of 8
ToanDN
in reply to: srey.chhoeun


@srey.chhoeun wrote:

hi Gary

Im just new to this whole formula thing and sound like you are the man to go to.

Im trying to set a condition for my voids object to a certain depth if the other solid object visibility is ticked.

but i couldnt find the right formula for this. would be great if you could help me out

sreychhoeun_0-1652398243113.png

 


If (1 Gang, {enter length value 1}, {enter length value 2})

Message 6 of 8
srey.chhoeun
in reply to: ToanDN

thank you so much @ToanDN 

really appreciated

Message 7 of 8
srey.chhoeun
in reply to: srey.chhoeun

sreychhoeun_0-1652664817131.png

@ToanDN can you please help me with this one as well.

i linked everything and the Label Txt Change as per input. however when i load into my project the text disappear.

still shown in property under text just wont shown on the ceiling plan.

what did i do wrong?

 

thanks

Message 8 of 8
ToanDN
in reply to: srey.chhoeun

It is a different topic. Please create a new thread.

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