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…
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.
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.
Solved! Go to Solution.
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
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))
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
@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
If (1 Gang, {enter length value 1}, {enter length value 2})
Can't find what you're looking for? Ask the community or share your knowledge.