User defined string conversion to predefined values

Hi guys,

I’m struggling with a list find/replace problem. I have a list of layer names (coming from a Human component) that I would like to convert into some predefined strings inherited from a database. I have a working solution but its not flexible enough to deal with any new/renamed layers or multiple files as the indicies plugged into the replace string component will need to be manually updated each time the layers change.

I’m trying to make this script as user friendly as possible. In an ideal world I would have some sort of UI where the layer name would pop up and ask the user “what would you like to rename this layer”. I’ve researched and it seems it might be possible to create a C# component that does this but I wouldn’t have the first clue where to start.

Any other (less drastic) ideas before I go down the C# rabbit hole? Thanks in advance.

I should also add - I’m not actually intending on renaming the layer in Rhino. The output actually forms part of a data entry that will be exported to excel for a Life Cycle Analysis calculation.


There are many ways to approach issues like this but we’ll need your GH file to understand it exactly.

Hi Joseph,

I’ve attached the Rhino file I’m currently working on, however with the GH definition I’ve isolated the relevant sections into a separate file as there’s a lot of WIP garbage in the main file that will just distract the conversation.

Just keep in mind you’ll need Human plugin installed to open it.

Josh (15.1 KB)
Sample project.3dm (8.8 MB)

Sorry, I’m still using R6 and can’t help with your R7 .3dm file. I don’t have the Human plugin either.


Good luck.

Just incase anyone else has the same issue here is the R6 file.

Sample project_R6.3dm (11.4 MB)