Conditional Statement - Parking family

Conditional Statement - Parking family

Anonymous
Not applicable
2,633 Views
9 Replies
Message 1 of 10

Conditional Statement - Parking family

Anonymous
Not applicable

I have created a line based parking family that has a nested parking family within it. There are two parameters that when checked, either add a second row or mirror the parking spaces. I am trying to adjust the count of spaces for scheduling and cannot figure out how to write a parameter that checks if both second row and mirror parameters are checked and then add them to the original count. I attached the Revit families used for reference. 

 

 

0 Likes
Accepted solutions (1)
2,634 Views
9 Replies
Replies (9)
Message 2 of 10

barthbradley
Consultant
Consultant

if(and(YesNo Parameter 1, YesNo Parameter 2), true, false)  

 

https://revitforum.org/showthread.php/1046-Revit-Formulas-for-quot-everyday-quot-usage

 


Using logical AND
IF ( AND (x = 1 , y = 2), <true>, <false>)
Returns <true> if both x=1 and y=2, else <false>

0 Likes
Message 3 of 10

barthbradley
Consultant
Consultant

Can you do me a favor and just Post the formula written in layman's terms using the actual Parameter Names in your family?   

0 Likes
Message 4 of 10

Anonymous
Not applicable

The way it needs to be set up is as follows:

If the number of spaces counted in the lined based family equals 10 based on the length of the line. The checkbox "Double" refers to a double parking option and will add a 2nd row, effectively doubling the number of spaces to 20. If the checkbox "Mirror" is checked, it will mirror the row of parking effectively doubling it to 20. The max number you could have if you originally drew 10 spaces would be 30 if both boxes were checked. 

0 Likes
Message 5 of 10

barthbradley
Consultant
Consultant
Accepted solution

If this is all about Scheduling, why not report the count of single spaces in the Project Schedule by nesting a single SHARED space into the first Host Family and then that Host Family nested into the main Host Family?  3-tiered instead of 2-tiered.  Know what I mean?  

 

...anyways, it sounds like the logical "AND" will work here. No?  

0 Likes
Message 6 of 10

Anonymous
Not applicable

Okay I understand what you mean. Instead of editing the parking family to include the double and mirror options, create another family that hosts 3 parking families controlled by the double and mirror shared parameters. Then host that in the line based family. I will give that a try. Thank you!

Message 7 of 10

barthbradley
Consultant
Consultant

Your welcome. Fun thread. 

 

Cheers!

 

 

0 Likes
Message 8 of 10

nmarcelis
Advisor
Advisor

@Anonymous 
Glad to see you got is solved.
It's nice to see that people use line based families with a practical use case.

Revit Certified Professional Architecture, Structure and MEP.
0 Likes
Message 9 of 10

Anonymous
Not applicable

Got it to work! This way gives me so much more functionality with the individual parking spaces themselves as well. Thank you again. 

Message 10 of 10

ToanDN
Consultant
Consultant
You could have create one parking space as a shared family and nest it in a line based family and that is it. from that one line based family you can layout the parking in the project with copy, mirror, etc... That gives you more flexibility in conditions where the rows have different lengths, wider or narrower island, etc...
0 Likes