Concatenate two parameters?

Concatenate two parameters?

clausneergaard
Contributor Contributor
20,455 Views
21 Replies
Message 1 of 22

Concatenate two parameters?

clausneergaard
Contributor
Contributor

Hello all -

 

I am wondering if there's anybody out there that is aware of a way to concatenate(?) two shared parameters, both defined as text fields.

 

For instance;

Parameter 1 [text]: "Hello"

Parameter 2 [text]: "all"

 

New parameter (with the concatenation);

Parameter 3 [text]: Parameter 1 + Parameter 2

 

...this would give me a Parameter 3 with the data "Hello all", correct? Is there a way to do this?

Thanks in advance. Any help is appreciated.

 

/Claus

Accepted solutions (2)
20,456 Views
21 Replies
Replies (21)
Message 2 of 22

XXalessio.amodioXX
Collaborator
Collaborator

 You can prepare two shared parameters e.g. Shared_1 and Shared_2.

Then you can a paremeter formula e.g. Par.Formula = Shared_1+Shared_2.

Then a new parameter Shared_3 as  Shared_3=Par.Formula.

0 Likes
Message 3 of 22

barthbradley
Consultant
Consultant

What version of Revit are you using. Revit introduced the concatenate feature (e.g. combine parameters) in 2018.   

 

BTW: the "3rd" parameter (e.g. the one that combines the two) is not a Shared Parameter.  

0 Likes
Message 4 of 22

ToanDN
Consultant
Consultant
You can combine parameters into a single column on a schedule. You can combine parameters into a single label in a tag. But you cannot present the combined value in the properties of the elements without something like Dynamo. If the first two suffice then there you go.
Message 5 of 22

clausneergaard
Contributor
Contributor

Hi Alessio -

 

Thanks for your reply.

 

I am wondering if you could build on your input - I am not sure I understand it. You're saying that it is possible, through the following process, if I get you correctly;

 

  • Prepare two Shared Parameters (e.g. Shared_1 and Shared_2).
  • Prepare a new Shared Parameter (as a formula), for instance Shared_formula_1 = Shared_1 + Shared_2.
  • Finally, prepare a new parameter Shared_3 (as a formula), ie; = Shared_formula_1.

Correct?

Thanks.

0 Likes
Message 6 of 22

Corsten.Au
Advisor
Advisor

You can place two parameters next to each other and remove the formatting line to achieve final result.You can place two parameters next to each other and remove the formatting line to achieve final result.

Corsten
Building Designer
Message 7 of 22

clausneergaard
Contributor
Contributor

Oh .. okay. I see. Thank you.

0 Likes
Message 8 of 22

clausneergaard
Contributor
Contributor

The problem is, though, that I don't want - per se - the data extracted into schedules. For now, at least.

 

I want it to be stored in the Family-parameter values ... for later usage.

0 Likes
Message 9 of 22

XXalessio.amodioXX
Collaborator
Collaborator

That is correct, Paramter formula could be even a family parameter.

The important is thta Shared_3 connected with the first two must be a shared parametr.

In this way you concatenate the first 2 shared parametr with the third.

0 Likes
Message 10 of 22

ToanDN
Consultant
Consultant
Accepted solution

@clausneergaard wrote:

Hi Alessio -

 

Thanks for your reply.

 

I am wondering if you could build on your input - I am not sure I understand it. You're saying that it is possible, through the following process, if I get you correctly;

 

  • Prepare two Shared Parameters (e.g. Shared_1 and Shared_2).
  • Prepare a new Shared Parameter (as a formula), for instance Shared_formula_1 = Shared_1 + Shared_2.
  • Finally, prepare a new parameter Shared_3 (as a formula), ie; = Shared_formula_1.

Correct?

Thanks.


 

No.  You cannot combine two text shared parameters to another text shared parameter with a formula.  You can only combine them to a label in a tag family, or combine them to a column ion a schedule.

Message 11 of 22

pieter7
Advisor
Advisor

Consider voting on these two revit ideas if you'd like to see that functionality implemented

 

 

Message 12 of 22

XXalessio.amodioXX
Collaborator
Collaborator

You are right. I did my syllogism considering parameter as [dimention] not [text]

0 Likes
Message 13 of 22

myuziklhaver
Explorer
Explorer

Hi. This is a little old reply and might not be relevant to your question but I'm also finding myself in a similar situation where I have 2 parameters where the value of the 1st parameter(cap1) will be from the 2nd parameter(cap2). cap1 is shared parameter and cap2 is a family parameter which values are generated from a catalog list(txt file). They are both text parameters. I already used cap1 parameter in all of my families and reflected them in my schedule so I equals cap2 to cap1 to reflect its values in my schedules.

At first I had only number registered into my catalog list for cap2 parameter but then I realized I wanted to show a unit for this cap1 parameter like GPM. So I started digging into concatenating it but it won't work since revit doesn't have text formulas. I just edited my catalog list and added GPM to cap2 values and it did the job. 

So you might want to pull out your values from a txt file instead.

hope this helps.

0 Likes
Message 14 of 22

dbillionMUYTG
Explorer
Explorer

I'm not getting it.

I'm using Revit 2022.

I have a Shared Parameter: Row

I have a Shared Parameter: Column

I have a Shared Parameter:  Label.  I tried to put in the formula Row+Column and got the error message: "Improper use of boolean expressions."

I created a non-shared parameter:  Text.  Tried the same formula and got the same error message.

What am I missing?

0 Likes
Message 15 of 22

Alfredo_Medina
Mentor
Mentor

@dbillionMUYTG wrote:

I'm not getting it.

I'm using Revit 2022.

I have a Shared Parameter: Row

I have a Shared Parameter: Column

I have a Shared Parameter:  Label.  I tried to put in the formula Row+Column and got the error message: "Improper use of boolean expressions."

I created a non-shared parameter:  Text.  Tried the same formula and got the same error message.

What am I missing?


 

If parameters "Row" and "Column" are text, you cannot do a formula such as Row + Column in another field. Text data cannot do arithmetic operators. What you can do is use "Combine Parameters" (concatenate text) in another field. 

Please refer to this article to learn more about combining parameters: https://help.autodesk.com/view/RVT/2023/ENU/?guid=GUID-D6EA2F43-0278-4E50-BADD-2AEA9C2FD26B


Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin
0 Likes
Message 16 of 22

pieter7
Advisor
Advisor
Accepted solution

This is currently not supported. Schedules have a dedicated feature to 'combine parameters', but concatenating parameters using formulas (be it inside the family, as a global parameter, a formula in a tag or a formula in a schedule) is not supported. 

 

 

Message 17 of 22

dbillionMUYTG
Explorer
Explorer

Okay, can only be done in a schedule.  Makes sense.  Thanks.

0 Likes
Message 18 of 22

clausneergaard
Contributor
Contributor

Hello all -

 

Thanks for all the inputs, thoughts and ideas. It’s been a while since I’ve tried to make it work, like, back from the start of the post. 

I’ve made some workarounds since then. 


So, okay. Figures. 

Thanks, though, to everyone. 

0 Likes
Message 19 of 22

L.Maas
Mentor
Mentor

Ther was a smilar thread in the stucture forum. We discussed using Dynamo to get several parameters from families, then combine them in a product code and then storing that code back into a paramter of the family.

I made an example script and uploaded the Dynamo script. Should be relatively easy to modify for your purposes.

https://forums.autodesk.com/t5/revit-structure-forum/parametros-combinados-en-una-tabla-a-ifc/td-p/1...

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

Message 20 of 22

clausneergaard
Contributor
Contributor

Awesome! Thanks.

0 Likes