Help With Revit Family Formulas - RADIUS <= WIDTH/2

Help With Revit Family Formulas - RADIUS <= WIDTH/2

kristian.pal86
Advocate Advocate
2,478 Views
7 Replies
Message 1 of 8

Help With Revit Family Formulas - RADIUS <= WIDTH/2

kristian.pal86
Advocate
Advocate

Hi Everyone

 

I was wondering if anyone would be able to help me. I have some simple line work families which I would like to place dimensional restrictions onto using formulas.   I have a Hot Water Tank drawn as a rectangle with a half circle radius on the long length as shown in the image attached. When the tank (the radius) is made larger than the rectangle it will separate the geometry and I would like to implement a simple formulas stating the the radius cannot be greater than the width of the rectangle / 2. 

 

 

Any guidance with this would be very helpful

 

Thanks

0 Likes
Accepted solutions (2)
2,479 Views
7 Replies
Replies (7)
Message 2 of 8

ToanDN
Consultant
Consultant
Accepted solution

Add [TankRadiusConstrain] Length parameter and use it for the dimension.  User still enters value for [TankRadius].

 

Capture.PNGCapture1.PNG

 

 

0 Likes
Message 3 of 8

barthbradley
Consultant
Consultant
Accepted solution

Add a second length parameter for Tank Radius (e.g. "Tank Radius Desired"). Manually input it a value for the "desired" radius. Then write this formula for the Tank Radius parameter: 

 

if(Depth/2>Tank Radius Desired, Depth/2, Tank Radius Desired)

 

However, tanks typically come in standard sizes. Are you sure you don't want to automatically size the tank platform to accommodate the tank size? 

 

0 Likes
Message 4 of 8

kristian.pal86
Advocate
Advocate

Thanks everyone,  

 

This is more of an exercise in formulas for me at the moment but thank you for your advice anyways.

 

Are there any resources available for learning the syntax other than trial and error? It seems that I get a massive amount of inconsistent units errors when I am playing with formulas. Id love to get better at it but this is a new realm of language for me.

 

Thanks in advance,

 

K

0 Likes
Message 5 of 8

barthbradley
Consultant
Consultant

Check out this Link. I think you might find it helpful. 

 

https://www.revitforum.org/tutorials-tips-tricks/1046-revit-formulas-everyday-usage.html

 

Smiley Happy

0 Likes
Message 6 of 8

kristian.pal86
Advocate
Advocate

I used this as well thank you for posting its a great resource. I was finding that even with the formulas I was getting a lot of Inconsistent Units errors.  Does anyone have any more information regarding that error and how formulas should be written to minimize that warning?

0 Likes
Message 7 of 8

ToanDN
Consultant
Consultant
The easiest way to deal with Inconsistent Units is add /1 after the parameter in the formula and set the calculated parameter to Number. The proper way is making sure the units set correctly for each and every parameter.
Message 8 of 8

kristian.pal86
Advocate
Advocate

OOOOOOOOOOooooh

 

That makes so much sense thank you so much!

 

0 Likes