I gat to sort curves by name to assign them different tube diameters.
my object are name with such name :
A344-611-7216
A344-231-6211
there is approximatly 200 object by files who have all a different name, every files have a different name to from A300 to A550 and more
what will be perfect for me here is to be able to pick some information and the whole name to apply my diameters.
so first I need probably to cut the name of the object then to sort it.
here I want to kill the A344 starting number, because I want the grasshopper file to works with any other files. then as an example the first number 6 in A344-611-7216 mean vertical tube and the first 2 in A344-231-6211 mean horizontal tube.
so basically, I want all the object who have a 6in the same position to be one diameter and all the one who have a 2 an other diameter…
You can use the “Characters” (Chars) component that split a string text and give also the unicode value.
Or also you can use “Text Split” to divide it in sub-strings.
See the tab “Sets”>“Text”.
With simple boolean logic (equality + dispatch) you can do whatever you want.
tube-sur-lignes_re.gh (10.9 KB)
Have a look at attached definition and see if it helps.
I don’t know the logic you want to use with those numbers… I did a simple sort.
(I didn’t have your plugin, so I made a small c# script to get the Names of the curves.)
hi guys, thank you very much for your helps, very nice !
combining both of your ideas I have built something who exactly look like what I had on my mine, but… it don’t work !
apparently since I have split the text I’am no longer working on geometry but only on informations/attributes, and I definitly don’t know how to get back to geometry to pipe them…
any idea ?
tx A344_Branche_NE-TEST-MEP-ANTHO-grasshopper3.3dm (575.5 KB) tube-sur-lignes-reponse-02.gh (10.5 KB)