Type description

Everyone,

I am trying to create a Dynamo script which can handle below tasks:

  1. Get value from different fields in a family type
  2. Concatenate the gotten value with separators
  3. Write the concatenated value to another field

Type Description_1

 

 

 

 

 

 

My idea (as shown below) does not bring me the expected result

Type Description_2

 

 

 

 

Please let me know your idea

Thank you

Your second image cannot be enlarged. Can you re-post it, please?

just add the values for each parameter using a code block

follow that link and you will find an answer to your problem:

http://dynamobim.com/forums/topic/how-to-change-a-list-into-a-string-to-replace-a-text-parameter/

 

 

 

 

Hi Andreas Dieckmann,

 

I re-post the second image with some modification
Hope you can see it

Thank you

Type Description_2

Hi Peter Kompolschek,
Thank you for your suggestion
I came across the post from the link you provided, but it seemed not to satisfy my case
Please take a look at my second image to know more about my case
Thank you anyway

It’s like Peter said - you can do that a lot faster with a code block. Feed the results of your GetParameterValueByName nodes into a code block that has a syntax like this:

var1 + “x” + var2 +“x” + var3;

you can’t did the job at second image because of family 600x800 does not have the parameter [d,bf,tw,tf],

if the family not have the parameter that will become list of nothing “”

like the last result of you image [600x800x{d}x{bf}x{tw}x{tf}]

because other parameter is nothing so that will become [600x800xxxx]

so you need to separate different group of family by parameter

if you do not have a naming convention that is general for your families you will have to check the families first, create two different lists and then create the text parameter

 

 

Andreas,

 

I am afraid your suggestion can not handle well in case the items in the list are empty the as the separators still remain in the returned string
For example, in case var1 is empty, it will return “xvar2xvar3”. But what I expect is “var2xvar3”

Anyway guys, I seemed to find a solution finally, although it does not look like a professional way
Thank you all for your idea and advice
Anyone better idea, please contribute
Look forward to receiving more professional solutions from you

Type Description

Hi , I cant see the final code image.
Im trying to name my families the same way, not to name but to make the Mark Type get info from the sizes of a family