BIM World
A Professional BIM Learning Platform


Common Conditional Statements in Revit

BIM Software Tip: Common Conditional Statements in Revit

1) Selecting between two parameters based on one parameter:

L = if(a > 3000mm, 5000mm, 7500mm)

Explanation: If a is greater than 3000mm, then L is 5000mm; otherwise, L is 7500mm.

2) Choosing between two parameters based on whether one parameter is true:

L = if(a, 5000mm, 7500mm)

Explanation: If a evaluates to “True,” then L is 5000mm; otherwise, L is 7500mm.

For example, if a = 3 > 2, then L = 5000mm.

3) Dividing another parameter into three segments based on two conditions:

Rotation angle = if(d < 34000 mm, a1 * n, if(d < 94000 mm, 10 * a1 * (n - 10) * a2, 10 * a1 * 20 * a2 * (n - 30) * a3))

Explanation: When d is less than 34 meters, the rotation angle is a1 * n. If d is between 34 meters and 94 meters, it becomes 10 * a1 * (n - 10) * a2. If d exceeds 94 meters, the rotation angle is 10 * a1 * 20 * a2 * (n - 30) * a3.

4) Conditional visibility constraints:

V = a > b

Explanation: When a is greater than b, the condition is met, making the element visible (checked). Otherwise, the element remains hidden (unchecked).

Additional Geometric and Mathematical Formulas:

Circle and Triangle Calculations:

S = abc / 4R — where R is the radius of the circumscribed circle; this formula relates the radius to the triangle’s sides and area.

5) Calculating arc length given a central angle an:

= 2 * pi() * r * (an / 360°)

6) Calculating the central angle given three sides and radius:

= 2 * asin(0.5 * c / r) — calculates angle C based on side length c.

7) Radius of an inscribed circle:

= 2 * s / (a + b + c)

Explanation: The area S of the triangle is equal to the sum of the areas of three smaller triangles, which is (r / 2) * (a + b + c) = S.

8) Calculating the volume of a triangular pyramid given angles and side edges:

= (1/6) * a * b * c * sqrt(1 + 2 * cosA * cosB * cosC - cosA^2 - cosB^2 - cosC^2)

9) Calculating the volume of a triangular pyramid given the base area and height:

= (1/3) * S * h

10) Finding the height given the volume and base area of a triangular pyramid:

h = 3 * V / S

11) Triangle area formula given three sides (Heron’s formula):

S = sqrt[p(p - a)(p - b)(p - c)]

or

= (1/4) * sqrt[(a + b + c)(a + b - c)(a + c - b)(b + c - a)]

Example in Revit expressions:

= 0.25 * sqrt((a + b + c) * (a + b - c) * (a + c - b) * (b + c - a))

= 0.25 * sqrt((d + e + f) * (d + e - f) * (d + f - e) * (f + e - d)) — for a second triangle.

12) Cosine law:

cosA = (b² + c² - a²) / (2 * b * c)

In Revit expression form:

= acos((b^2 + c^2 - a^2) / (2 * b * c)) — calculates angle A using inverse cosine.

Similarly, for angle B:

cosB = (a² + c² - b²) / (2 * a * c)

Calculate sinB given cosB:

sinB = sqrt(1 - cosB^2)

13) Triangle area formula given two sides and the included angle:

S = 0.5 * a * b * sinC

xuebim
Follow the latest BIM developments in the architecture industry, explore innovative building technologies, and discover cutting-edge industry insights.
← Scan with WeChat
Like(0) 打赏
BIM WORLD » Common Conditional Statements in Revit

Comment Get first!

Must log in before commenting!

 

BIM World, A Professional BIM Learning Platform

Stay updated on the latest architecture trends and share new building technologies.

Contact UsAbout Us

觉得文章有用就打赏一下小编吧

非常感谢你的打赏,我们将继续提供更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫

微信扫一扫

Account Login

By signing in, you agree toUser Agreement

Sign Up