Using calculated formulas' in schedules to show a Family type as a yes/no

Using calculated formulas' in schedules to show a Family type as a yes/no

Mark_Engwirda
Collaborator Collaborator
1,824 Views
17 Replies
Message 1 of 18

Using calculated formulas' in schedules to show a Family type as a yes/no

Mark_Engwirda
Collaborator
Collaborator

Our window families have various glazing bar options, colonial, craftsman and nil etc.
They are controlled using a shared family type (generic models) so that they can schedule in our projects and show up in the schedules using their family names as you would expect.

What I would like to do as an alternative to having their full family names displayed I would rather just have a simple "yes/no" or a "do/blank" showing to give the schedules a cleaner look.

My issue is I don't know how to use the formula syntax to achieve this correctly.
Below are a few attempts in vain, and it may be that what I am trying to do can't be done!

Please note that the text I'm using in the schedules is an all-caps text which is why it looks different to the parameter names 🙂

 

See below for my 3 attempts, conditional statements are definitely not my strong point.

 

 

 

 

0 Likes
Accepted solutions (2)
1,825 Views
17 Replies
Replies (17)
Message 2 of 18

benschilders
Advocate
Advocate

To my knowlegde the formula's from Yes/No parameters in Revit only look to a value being true or false with one variable.

So for exmaple:

parameter A: this can be a value from 0-5

Yes/No parameter formula: parameter A = 2

Value's 0,1,3,4 and 5 will report the Yes/No parameter as a NO
setting Parameter A to 2 will report the Yes/No parameter to YES

benschilders_0-1659086329839.pngbenschilders_1-1659086349550.png

 

Conditional statements can contain numeric values, numeric parameter names, and Yes/No parameters.

 

If you can share the family i wouldnt mind to take a look at it.


Also you could try to have a look at this really helpfull forum:
https://www.revitforum.org/node/1126

pyRevitHave a look at my idea: Material priority Revit quick start guide ┃Please accept soulution if my anwser solved your problem
0 Likes
Message 3 of 18

vancikv
Advocate
Advocate

Conditional statements cannot analyze text values, only numbers and booleans AFAIK. So I don't see how what you're attempting could be done.

 

Been so since forever. There's a really old post about it if you're interested. There's an idea as well I think, but can't find it atm.

https://forums.autodesk.com/t5/revit-architecture-forum/if-statements-for-text-parameters/td-p/52145...

0 Likes
Message 4 of 18

benschilders
Advocate
Advocate
0 Likes
Message 5 of 18

barthbradley
Consultant
Consultant

I don't understand what you are trying to achieve, but it sounds like it's all about working with a Family Types Parameter.  It this case, a Family Types Parameter that controls the "glazing bar option" which is either "colonial", "craftsman" or "nil" - which I assume means no glazing bar option. 

 

Sounds like you want to control what Family the Family Type Parameter uses via a checkbox which you manually check. Am I warm? Or do you want the checkboxes  automatically checked depending on the glazing bar option the Family Types Parameter uses?  OR...do you want a Text Parameter to read something depending on the option bar option? 

 

Whatever the answer, it sounds like something I would do in the Family environment - not through a Schedule.  Any Shared Parameter value in the Family can be reported in a Schedule. That's what Schedules do best.  REPORT.  

 

Here's some screenshots that might help. Like I said, I don't fully grasp where you are headed, but I think these screenshots will help you get there.   

 

PIANO 1.pngPIANO 2.pngPIANO 3.pngPIANO 4.png

 

 

Message 6 of 18

Mark_Engwirda
Collaborator
Collaborator

Thanks for replying Bart Bradley, appreciate it.

So I am not trying to control the visibility of the type of mullions by the schedule, although the schedule does allow this.

What I am trying to do is abbreviate the " family name" shown in the schedule column to something shorter e.g. "Yes" if  the family type is a mullion, or "No" if the family type is "Nil"

So to recap,  instead of showing the nested family type "colonial mullions"  in the schedule, I would like to see "Yes"  or maybe "." in the schedule column as an example.

 

I have attached a screenshot of how the family works and what it looks like in the schedule.

 

0 Likes
Message 7 of 18

Mark_Engwirda
Collaborator
Collaborator

Thank you benschilders, the link you sent "Allow text in formulas" is pretty much along the same lines as my issue.

I have given the "Allow text in formulas" a thumbs up and apparently this is under review with 807 votes!

Message 8 of 18

barthbradley
Consultant
Consultant

As shown in the screenshots I provided: the only way to reference a Family Type Parameter Value in a Formula of another Parameter, like a Text or Yes/No Parameter, is to compare a Family Types Parameter with another Family Types Parameter.  

 

Say, for instance, you have a 2 Family Types Parameters named "FTP 1" and "FTP 2". A Yes/No Parameter could reference a Family Types Parameter with a formula like this: =if(FTP 1=FTP 2, 1=1, 1=2).  Or a Text Parameter could reference a Family Types Parameter with a formula like this: =if(FTP 1=FTP 2, "YES", "NO").   

 

Confused yet?  

 

 

Message 9 of 18

Mark_Engwirda
Collaborator
Collaborator

Sorry for such a late reply barthbradley, I have been totally snowed under.

I did have another look at the example you provided.

I do only need a Text Parameter to read something like Y or N depending on the glazing bar option, but the choice of bars is directly selected from the mullion family parameter which is an instance parameter and not a tick box.

I just don't know how to write that formula to make it work.

 

 

 

0 Likes
Message 10 of 18

ToanDN
Consultant
Consultant

Share the family here.

0 Likes
Message 11 of 18

Mark_Engwirda
Collaborator
Collaborator

Hi ToanDn, window family attached.

0 Likes
Message 12 of 18

ToanDN
Consultant
Consultant
Accepted solution

See revised family.  Add the parameter Glazing Bars Note to your schedule and it should report Yes No accordingly.

 

ToanDN_0-1659582089638.png

 

Message 13 of 18

barthbradley
Consultant
Consultant
Accepted solution

Is this what you are after:

 

 

Project Window Glazing.png

 

You can get there a few ways - all pretty much by using the approaches I described above.   I'll let you decide by examining what I did here. Your Family is in the attached RVT. 

Message 14 of 18

Mark_Engwirda
Collaborator
Collaborator

Brilliant, thank you!

0 Likes
Message 15 of 18

barthbradley
Consultant
Consultant

@Mark_Engwirda wrote:

Brilliant, thank you!


 

What about me? I'm the one you provided the solution. Did you read message #5?  That's exactly what @ToanDN regurgitated.  

 

I'm sorry I wasted my time here.  

 

 

0 Likes
Message 16 of 18

Mark_Engwirda
Collaborator
Collaborator


 

Message 17 of 18

Mark_Engwirda
Collaborator
Collaborator

Big apologies barthbradely, I really appreciate what you did and all of your efforts and yes you solved my conundrum as well, just happened that I saw ToanDN's solution first 🙂
For me, the way you both solved the problem is invaluable, thank you once again.

0 Likes
Message 18 of 18

barthbradley
Consultant
Consultant

I appreciate the shout-out, @Mark_Engwirda.

 

You're very welcome.  

 

😉

0 Likes