Coding in grasshopper to try to renumber my tree branches from {0}, {1}, .... to diff indices of branches {230}, {234}, .... Only the first tree is more regular in its naming, the second tree came from a bigger tree and I picked these branches as I needed to manipulate them. However, when manipulating them, I had to change my branch index from the {230}, {234} .... to that of one beginning with zero to match that of incoming data. As a result, I tried manipulating my data in python to reverse the manipulation done previously.
I tried a code in python taking in the branch indices I needed and outputting modified indices according to Rhino/Grasshopper syntax
import rhinoscriptsyntax as rs
for i in x:
a = y.RenumberPaths("%s" %i)
Expected output of data tree with manipulated branch indices. Error: Runtime error (ArgumentException): An entry with the same key already exists.
Traceback: line 13, in script
Line 13 is just the one that says a = y.Renumber...