Combine 3 parameters and concatenate into a fourth parameter for tagging purposes

I have reviewed many of the posts on combining parameters into one like what I am trying to do. The problem is they are older or I am having trouble translating the solutions into my specific situation.

I know I have the ability for a tag to concatenate them however the particular parameter I need to grab from the families is not a shared parameter. So I created a calculated value in the tag family and it gets me close, however, I cannot control the rounding intuitively.

That being said, I think Dynamo is a better way to accomplish what I am afterbut I am missing something in my script and I cannot figure it out.

Basically I am trying to grab the model number, W, H and D of some casework families and have it set that parameter in those same familes. I have no errors however the parameter is not being set. Also, I am trying to be able to use a selection box to select certain families, not all of them in my model. I want this to be flexible for use in future projects.

an example would be a TMI base cabinet with the separate parameters being “D2205”, the W = “36”, the Height = “36” and the Depth = “24”. This, in the end, would write this string as “D2205363624” to, in this case, the “Type Comments” parameter of the selected families.

Any ideas?

FYI the “try1 - try10” strings you see are the test parameter names for the models of the casework family types selected in the screencap trial below…

It appears that it is writing to the Type Comments parameter however its entirely wrong as you can see in the screen cap below.

This parameter for this piece of casework should be “try1363624”…not grabbing the parameters of all the strings of all the families selected and inserting it into one family. If that makes sense. What am I not seeing?!

Look closely at the data previews you’ve posted. Specifically the highlighted values in this clipping below:

The String.Join node I circled iterates over level 2 of each list, setting the values as a single item. It does not combine the first item in the first list to the first item in the second list and so on - it’s one of those ‘odd lacing’ cases that way.

There are certainly a good many options to solve this (join them into one list and use a List.Transpose node on them, addition functions in line or sequential, etc.). My personal favorite is to address the list structure by moving further upstream in the graph and leverage lacing get desired values from the elements in a single list of lists. If done correctly this produces a data structure which more readily lends itself to the String.Join method you’ve started with.

2 Likes

Just because Jacob’s (excellent) graph is a bit intimidating :stuck_out_tongue:

As Jacob noted, List Transpose is key to what you’re trying to achieve…

The majority of the rest of his graph is data manipulation :slight_smile:

Hope that’s useful,

Mark

3 Likes

Ok thanks guys. I will take a look when I am back in the office. I haven’t worked with a ton of lists, its something I have been meaning to master in my young Dynamo career. =)

I will report back what I do…

1 Like