- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.