How to re-order Tree Branches

unhandled

(Starzred) #1

Dear All

Please excuse my simple question. I have a simple case here consisting of 2 branches {0} & {1}.

All I need to do is to change their orders so that {0} becomes {1}.

I have tried reverse list but that obviously wasn’t the correct choice.
Much appreciate if some kind hearts could lend a hand on this.

I have attached the script herewith. Many thanks in advance!

Kind regards
Yuatakatree branch renumber question.gh (4.7 KB)


#2

like this?

tree branch renumber question_sg.gh (5.3 KB)


(Starzred) #3

Hi Gijs

Yes this is exactly what I need, you are a genius. Can I assume that if the tree has more indexes, I will hae to reorder them one by one this way or would there be a single command that simply reorders from front to back with one step?

Many thanks!


#4

I’m not saying there isn’t another way, but I don’t know to do it other than I posted.


#5

This works…
reorder branches.gh (3.2 KB)


#6

Check this as well.
For this to work, you should uncheck “Maintain Path” option ofTree Branch component to “Renumber” via RMB popup menu .

tree branch renumber question_re.gh (9.3 KB)


(Starzred) #7

Hi Gijs

Thank you for the options! much appreciated!


(Starzred) #8

Hi HS Kim

Thank you very much, that does the job just as I needed, thank you for your help! much appreciated!