Using text parameter on checkbox's formula

Using text parameter on checkbox's formula

aboyacioglu
Explorer Explorer
563 Views
5 Replies
Message 1 of 6

Using text parameter on checkbox's formula

aboyacioglu
Explorer
Explorer

Hi,

If the value of DW_Protection_Text is DPFH, I want the checkbox for Door Protection Full Height to be selected. However, when I write the formula if(DW_Protection_Text = DPFH, 1 < 2, 2 < 1), it gives the error you see below.                                                    

Screenshot 2025-01-23 092649.png

Screenshot 2025-01-23 092727.png

Can text parameters be used in checkbox formulas? What is the correct formula?

Note: The formula if(DW_Protection_Text = "DPFH", 1 < 2, 2 < 1) also does not work.

0 Likes
Accepted solutions (1)
564 Views
5 Replies
Replies (5)
Message 2 of 6

dtiemeyer
Advisor
Advisor

I dont believe it is possible in this arrangement. I've never been able to parse a text parameter and get any results. The only reason to not make DPFH a checkbox itself is if there are multiple possible values (more than just true or false), in which case a small list of checkbox options is generally the way to go because then your if/then statements become tolerable, but more than a handful of possible values makes the resulting required formulas nightmarish.

My other CAD is a Cadillac and I like to Revit to the Max!
0 Likes
Message 3 of 6

aboyacioglu
Explorer
Explorer

Yes, I realized this after some research. I created an integer parameter and linked the text to it, but that didn't work either. The data will come from the text parameter; is there no solution for this?

0 Likes
Message 4 of 6

dtiemeyer
Advisor
Advisor

Perhaps this workaround, but 'list' is not a type of data supported by parameter values.

How to create parameter drop-down list in Revit

My other CAD is a Cadillac and I like to Revit to the Max!
Message 5 of 6

bwieldraaijer
Participant
Participant
Accepted solution

It is possible but not with a just a formula, you can add a lookup table as shown in the image and family i've included in my reply.

You'll need to add a parameter for the lookup table name ('LU' in the image, but could be named however you'd like) as shown.

 

bwieldraaijer_1-1737715367089.png

I hope my explanation makes sense and that this helps!

Message 6 of 6

aboyacioglu
Explorer
Explorer

thank you it's helpful

 

0 Likes