Revit Family Formulas

Revit Family Formulas

Anonymous
Not applicable
2,517 Views
10 Replies
Message 1 of 11

Revit Family Formulas

Anonymous
Not applicable

Hello one and all.

 

i have a conundrum that i hope someone can assist me with.

 

I have a fairly decent understanding of families in Revit. I create electrical equipment for my company. I have learnt how to create door swings that open and close to any degree you wish. Now, what i cant seem to do is create a formula that would allow me to have one door open and the other closed. What i mean is

 

IF (A=90, B=0) 

 

the trouble with this is i need to have a true and false statement.. Every time I try Revit just wont allow it. 

 

Can somebody suggest a solution to resolve this. 

 

Also, I apologise if this is in the incorrect forum. Its my first time posting.

0 Likes
Accepted solutions (1)
2,518 Views
10 Replies
Replies (10)
Message 2 of 11

dmiller_SCE
Collaborator
Collaborator

Not sure if this helps you but I have a similar situation in one of my families. It this example the user can select to have Door A open, Door B open, or both open. They can also specify the angle of the door swing. 

 

Capture.JPG

0 Likes
Message 3 of 11

Anonymous
Not applicable

Family Parameter.png

So, The idea you have is pretty much what I'm after but I think my parameters are different so require a different formula.

So I'll just explain again what I expect the formula to look like

IF(Door A=90, Door B=0) But I'm missing the third 'rule'. Do I need a False statement or am I missing the Boolean? 

0 Likes
Message 4 of 11

dmiller_SCE
Collaborator
Collaborator

I am not sure exactly what you need, but the problem is that you need to have parameters that drive the geometry that you link to parameters that the user specifies. Now you can accomplish what you  need multiple ways but here is a crude example of what you ask. Angle A, and Angle B is what you would use to move the Geometry. Door A and Door B is the angle that the user would fill out. However in this example if someone specified a angle for both Door A and Door B the Angles would default to 0. You should be able to take this and improve on it. 

 

Capture 2.JPG

0 Likes
Message 5 of 11

Kelsey.S
Autodesk Support
Autodesk Support

Hi @Anonymous,

 

I was wondering whether or not any of the replies help with your question. 

 

Please mark any posts that help with "Accept as Solution" and thanks.

 



Kelsey Skaug
Autodesk Technical Support
0 Likes
Message 6 of 11

Kelsey.S
Autodesk Support
Autodesk Support

Hi @Anonymous,

 

Checking back here. Just to confirm, is the expectation that if there is  a door that is is open at 90, then door b should be closed (0)?

 

Is it expected that only one door is open at a time?

Can they both be closed? 

 

It's helpful to understand what you're expecting to see to help define the required formula / parameters, etc.

 

Thank you.

 

Please mark any posts that help with "Accept as Solution" and thanks.

 



Kelsey Skaug
Autodesk Technical Support
0 Likes
Message 7 of 11

Anonymous
Not applicable
Hello Kelsey The issue is currently unresolved. So the basic idea is as follows. If Door A is Open (90°) Then Door B will Be Closed (0°) If Door B is Open (90°) Then Door A will be Closed (0°) So one door will always be open. And one door will always be closed.
0 Likes
Message 8 of 11

ToanDN
Consultant
Consultant
Quote: Hello Kelsey The issue is currently unresolved. So the basic idea is as follows. If Door A is Open (90°) Then Door B will Be Closed (0°) If Door B is Open (90°) Then Door A will be Closed (0°) So one door will always be open. And one door will always be closed. ------------- - Create a Yes/No parameter A_open - Create an angle parameter A_angle for door A, enter formula: if (A_open, 90, 0) - Create an angle parameter B_angle for door B, enter formula: if (A_open, 0, 90)
Message 9 of 11

Kelsey.S
Autodesk Support
Autodesk Support
Accepted solution

Hi @Anonymous,

 

Here are a couple ways to try:

Example 1:

door.gif

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Example 2:

door 2.gif

 

Please mark any posts that help with "Accept as Solution" and thanks.



Kelsey Skaug
Autodesk Technical Support
Message 10 of 11

Anonymous
Not applicable

Thank you Kesley

 

That worked perfectly.

 

Just so I understand. The Yes/No parameter is key here. That's what is helping drive this formula?

 

I understand that If statements require a Boolean, True and False statements to work.

 

Could you maybe build on this to deepen my understanding for future applications.

 

Thank you for the solution. My boss will be very pleased with this.

Message 11 of 11

Kelsey.S
Autodesk Support
Autodesk Support

Hi @Anonymous,

 

That's great news! I'm glad it worked for you. 

 

That's right. The yes/no parameter is key to driving the result.

 

The logic of the desired outcome has to be reflected into a formula. Looking at the original image, there is nothing that is reinforcing (if A is open, then B is closed --- if A is Closed, then B is Open)... this is what is reflected in =not(Is Door A Open).

 

These formulas can be tricky and typically it's just practice to build the skill of taking the desired outcome and translate into formulas. However, here is the help documentation you may like to review: Formulas

 

Thank you for your participation on the forums. Have a great week!

 



Kelsey Skaug
Autodesk Technical Support