If and condition for text

If and condition for text

alecatalan
Contributor Contributor
879 Views
6 Replies
Message 1 of 7

If and condition for text

alecatalan
Contributor
Contributor

a very specific query, someone knows how to enter a text for an if and validation. It turns out that for a reduction of PPR material that I am making the family I have two diameters that in this case the parameter Nominal Diameter 1 and Nominal Diameter 2 that when validating if the Nominal Diameter 1 is for example 40 and Nominal Diamter 2 is 25 I enter the text "6000001003-4025". When doing the if and tells me that the text entered as code "6000001003-4025" does not exist (it is taking it as a parameter). I have 3 options for different diameter and that is why I need to enter a code to each one and that should be the validation or there is another way to check two parameters to assign the text. Thank you.

Regards,

Alexis Catalán
CAD/BIM Administrator
0 Likes
Accepted solutions (1)
880 Views
6 Replies
Replies (6)
Message 2 of 7

ryan.lenihan
Enthusiast
Enthusiast

you can't validate strings in if statements in revit, only numbers. you can report strings out but that's not what you want to do.

 

from what i understand, you are trying to do the following

 

  1. place reducer
  2. enter product code (instance parameter?)
  3. product code sets the correct size

if that is the workflow you are trying to follow, there is a much better way to apprach this. have you considered lookup tables? the purpose of lookup tables is for exactly what you're trying to do, there is even a trick to getting the lookup table to report the text for your part number back to your family.

 

lookup tables validate based on either a single dimension or a series of dimensions, being able to validate based on mutliple values is what gives you the ability to confirm your pipe fitting configuration matches that of a manufacturer specification.

 

there is quite a bit involved in lookup tables, so to avoid a long post and to throw in a shameless plug, the posts i've linked below are based on a presentation i made at BiLT and explain how to do everything you're trying to achieve with a lookup table.

 

http://www.revit.com.au/lookup-tables-part-1/

http://www.revit.com.au/lookup-tables-and-you-part-2/

 

you can even use the text reporting trick to warn you that the fitting is a non standard size.

 

0 Likes
Message 3 of 7

alecatalan
Contributor
Contributor

Thank you very much for your time to answer, what I'm doing are fitting families that are working with parameters per instance that are some with lookup table.

I have reductions that the nominal diamter 1 the same and nominal diameter with 4 values, example: 50x20, 50x25, 50x32 and 50x40. What I want to do is look if nominal diameter 1 is 50 and nominal diameter 2 is 20 assign a code, another example if nominal diameter 1 is 50 and nominal diameter 2 is 25 assign another code and so go selecting codes by set diameters. With lookup table I can not assign the code or indicate what code it is, or can it? since when assigning the parameter it is indicated that it searches according to the value the result that the table has for it.

Regards,

Alexis Catalán
CAD/BIM Administrator
0 Likes
Message 4 of 7

fabiosato
Mentor
Mentor

Hello,

 

From Revit 2018.2, you can extract multiple text parameters from the lookup table.

This is a good option for such feature, it is important also to consider when the values occurs in the opposite combination, like 20x50, 25x50, 32x50, 40x50.

Fábio Sato
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 5 of 7

alecatalan
Contributor
Contributor

Thanks for the information, to make the assignment with the different variants as it would be the formula of call to condition that when are the measures that I require assign those parameters ?. The problem that I take the value of the diameter of the first that I have in the table and not the one I require.

Regards,

Alexis Catalán
CAD/BIM Administrator
0 Likes
Message 6 of 7

fabiosato
Mentor
Mentor
Accepted solution

Hello,

 

You have to swap the values on each end, like:

ND1   ND2

25      50

50      25

Just remember to prepare the geometry to work properly.

Fábio Sato
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 7 of 7

alecatalan
Contributor
Contributor

Thanks, I checked and it works as a direct call

Regards,

Alexis Catalán
CAD/BIM Administrator
0 Likes