Optimise my grasshopper work

Hi guys, thanks to you I have made some great progress the past weeks,
I have done a job who is actually working but seems quiet complicated and can surely be simplified a lot .
here are my files :
Diam-tube-01.gh (23.5 KB)
Branche-test.3dm (2.9 MB)

somebody else outside my job is building a grasshopper file to assign tube diameters attributs. And I’am using thoose tube attributs to build a model, cause everybody is only working in wire for the moment…

how can simplified my work (i’am using elefront plug_in) ?
here, is it possible to have only one item to pick 2 or 3 layers ?
01

here I have separated the Attribute D27 or other into D and 27 using a empty panel, it works but that probably not cleanest way…
I would also know if there is any item woh can alow me to “cull” all the value who are present more them one time to be able to see exactly how many different diameters there is on my branch ?
02

and the most important :
I want to pick only the object named 17, how can I wrote that in the panel ? maybe I should used a diffenrent tool them the includes tool…
and is there is anyway instead of doing 20 different piping to do only one saying all the tube 17 are 17ø and all th X are Xø in only one item it will be marvellous, but that not the most important…

Hi again.
I haven’t found any “Attribute D27” in your rhino geometries (names?).
I’ve used the second fragment of line names.

Btw, to remove the first character of a string in gh you can do it like this, step by step:

  • convert the string to a list of character; (ex “hello” to (‘h’,‘e’,‘l’,‘l’,‘o’)
  • splitting the list at the first element; ( (‘h’) and (‘e’,‘l’,‘l’,‘o’) )
  • joining together the characters of the ((‘e’,‘l’,‘l’,‘o’) to “ello”)
    And then you can use that string as a number (gh will implicitly convert it string>number)
    I’ve done it inside attached definition, have a look.

As i dont have your plug-ins I made a workaround in c#, hope it’s not a problem.
(and a function to auto update layer list to a value list component)
Diam-tube-01_re.gh (13.7 KB)

1 Like

Branche-Test-re.gh (5.6 KB)

1 Like