Object naming from a list

Hi all,
Looking for two different ways to name lots of objects.
-a simple way to name objects based on a list (a text list generated in excel)
-a way to name objects based on the text in a text dot. (ex: I have 600 objects labeled with numbered dots, I want to run a script that lets me pick a dot then select objects to have the name be what’s in that dot, or select objects first then pick the dot, either way.

I need to do this in a specific order for these objects.

If anyone has something let me know, thank you!

Hello - how do you want to associate objects to names?

-Pascal

Hi Pascal,
I will manually pick each set of objects for each name association. (objects are randomly scattered, no grid organization possible.)

Similar to the way the autonamer works in Peter’s Tools, the text input pops up for each set of objects, this text entry would be autofilled by the ordered list.

Ideally I wouldn’t have to pre-select in order every set of objects though. Would be great to run the script, Rhino asks what objects I want named with the first name, select the objects, rinse and repeat down the list.

Hello - well, here is a very quick try -see if this is it - it looks for csv and txt files -

NameObjectsFromList.py (1.0 KB)

To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"

-Pascal

Amazing! Thank you Pascal!
My only request on this would be to have the ability to cancel in middle of the operation. When I hit escape it wants to go through the whole list, which is problematic for a huge # set.

Yep, I know - it looks like I can either let you skip names, or cancel, but so far not both… still poking…

-Pascal

i’ve read this thread but i’m not sure how to use it. can you explain?

Hello - the input is a text file with a list of names - the thing reads that in and for each name, one by one, you get to choose the objects to be named.

-Pascal

2 Likes

and it’s MAGIC pure Magic!!! Thank you again Pascal!

skipping useful.
canceling useful!

@carvecream - replaced up there ^^ see if that works any better.

-Pascal

Looking to extend the script with UserText Key, Value data.
So every CSV line look like ObjName, Key1, Value1, Key2, Value2
When the key would already exist, only the value should be updated.
Anyone could create an example for this?