At my wits end here.
I am trying to use an "IF" statement to output a specific text string that i can use a tag to identify an object to a prefab worker in a 2 or 3 digit alpha numeric tag or label.
The item i am building is a strut/hanger family set to 1'-0" in length, joined to an all-thread length adjustable in 1'-0" increments. I want to use the All-thread length to determine which one of these identifiers 1A, 1B, 1C,ect which will = 1' strut 1' rod / 1' strut 2' rod / ect.
Ideally this formula would lend itself to further refinement to add the strut length in 6" increments to also be used for determining and outputting the correct 3 digit nomenclature.
My initial statement looks like this:
IF((Length_O_Rod/1')=1, 1A,IF(Length_O_Rod/1')=2, 1B,IF(Length_O_Rod/1')=2, 1C)))
I tried this for several hours. attempting to remove the "inconsistent units error, " The following i not valid parameter"
I have pretty much given up trying to solve this. I did attempt to generate a lookup table but Auto desk doesn't really give adequate instruction for a novice to understand what to actually do. So, unless one of you programmer types can come up with a solution that i can understand.I will have to rely on using 8 individual families divided into 11 different types to be tagged for exporting.
Thanks for your help before hand I think i have this set up to alert me to replies, I case i have messed it up dont get pissed cause i didn't answer a post. I will be back to it. OH, almost forgot, here is a snip it of my data if you wish to see what i am using for parameters.
Regards,
Todd Bowen USN(Ret.)
Gelöst! Gehe zur Lösung
Gelöst von ToanDN. Gehe zur Lösung
Gelöst von barthbradley. Gehe zur Lösung
you're missing the quotation marks and "Something else"
IF((Length_O_Rod/1')=1, "1A",IF(Length_O_Rod/1')=2, "1B",IF(Length_O_Rod/1')=2, "1C", "Something else")))
..aren't the 1st and 2nd nested "IF" statements the same?
...wouldn't this be the same thing?: if(Length_O_Rod = 1', "1A", if(Length_O_Rod = 2', "1B", if(Length_O_Rod = 3', "1C", "Something else")))
No sir, if (param = 2 then 1B) . 2nd statement is to define the next type of strut. strut is being defined by size and then all-thread length. 1A = 1'strut/1'AllThread, 1b = 1'strut/2'allthread. up to 5 foot all thread.
I tried this formula and it does not give errors. THANK YOU. Q: what is the purpose of the quotation marks "-"? I didn't see those in any example give on AD help.
R,
Todd
More questions Mr. Bradley,
Q: is this only good for using one parameter to define and output?
I.E - to determine a cumulative output by using both all-thread and strut lengths?
Q: Is the order in which the differing inut lines. dimensions then general then data determine what formula is being used first?
R,
Todd
@Anonymous wrote:
I tried this formula and it does not give errors. THANK YOU. Q: what is the purpose of the quotation marks "-"? I didn't see those in any example give on AD help.
R,
Todd
Quotation marks are required to report text values in a formula. See link below for more about formulas.
https://www.revitforum.org/tutorials-tips-tricks/1046-revit-formulas-everyday-usage.html
Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.