Dear Path Mapper,

Why couldn’t you be made more versatile ?
I naively assumed that you could double as a “Replace Path” alternative if, instead of using letters and wildcards, I used actual path numbers.
But no : you just stack my lists into each branch of the new tree :

One could also argue that the “Replace paths” could be made to work like a path mapper if it accepted letter placeholders and wildcards, but with the added bonus of having a dynamic input.

In short, I find that these two tree management tools could be advantageously combined into one, and I certainly am more interested in what GH2 has in store in that area than in the color picking business.
IF you see what I mean.

Look closer.
My mapping cannot be described like this.

Oh. I assumed that there was a pattern, otherwise there is no point in using that component, it was not designed to change paths by hand, but to do it with a grammar.

My argument is that it could do both, and also get better by making the pattern definition dynamic.

That’s like developing the math for counting with the fingers.

I totally agree, however, this way we can dynamically change Path Mapper: (16.7 KB)

It only takes 3 lines of code to implement Path Mapper with dynamic input but as @Dani_Abalde mentioned it’s not the way it supposed to work.

private void RunScript(DataTree<object> data, string source, string target, ref object A)
    DataTree<object> treeOut = new DataTree<object>();
    GH_Lexer.PerformLexicalReplace<object>(new GH_Lexer(source), new GH_Lexer(target), data, treeOut);
    A = treeOut;
  } (17.9 KB)