Wish: "Select by same object name" to directly select objects of the same name as the currently selected one(s)

When running the “Select by object name” command, a pop-up window appears where the user is allowed to pick the object name(s) that he or she would like to select eventually. When the user pre-selects one or more objects and run the “Select by object name” command, once again Rhino will bring the same window. This is good and useful, because it lets you add more objects to the current selection.

It would be even better to have an alternative command which allows to directly select all the objects of the same name in the scene when at least one *named object is already selected. Lets say the user selects objects named “RH-1-NO” and “RH-1-YES”. Pressing the “Select by object name” icon with the LMB will bring the classic selection window. However, pressing the same icon with the RMB could run “Select by same object name” command to select the remaining objects that share the same name as the pre-selected ones. This is especially helpful in scenes with hundreds or thousands of named objects where the user would spend way too much time in browsing across the long list inside the regular selection window to find out the desired object names.

P.S.: *If the selected object has no name, then the “Select by same object name” command could select all unnamed objects in the scene.


Here’s a quickie script that might help in this case…

SelSameName.py (688 Bytes)


Thank you! That functionality deserves to be a native part of Rhino! Works exactly as described. :slight_smile:

I could add this, but as the script can select objects with multiple names, what should happen if the user selects some objects with names plus at least one object without a name at the same time?

1 Like

Select all objects with that specific name + all objects without names.

1 Like

Yes, that is one possibility, but the other is to ignore objects without names… (i.e. assume that only named objects are wanted since at least one was included in the original selection)


The way I look at it "" (empty string) is also a name, but yes, it depends on the preferences.

1 Like

Here, you can have it both ways…

SelSameName2.py (1.2 KB)

If you want it to select objects without a name as well as with if both are included in initial selection, just add a True argument to the last line - i.e. SelSameName(True). Otherwise unnamed objects included in the initial selection with some named objects will be ignored.


I just found that I already have one script (not sure who of this forum made it) called “Select unnamed”. :slight_smile: Using the “SelSameName.py” script only for selecting named objects (ignoring the unnamed ones) makes sense. :slight_smile: I applied it to the RMB of the “Select by object name” button and named it “Select objects with same name”.

P.S.: I can’t believe that Rhino does not have a native option to quickly select objects with same name or unnamed objects. The only way to do so in the default program is to evoke the “Select by object name” window, which, as I mentioned in my OP, could become very long and difficult to work with. Your script solves that. :slight_smile: Thanks!

Scripts solve lots of issues. Learn Rhino then learn to script and there won’t be much you can’t do.


Well, I guess I’m too dumb to learn Rhino script… :smiley:

But right before that quote in your post I wrote the following:

“I can’t believe that Rhino does not have a native option to quickly select objects with same name or unnamed objects.”

Also, since Rhino is an engineering program primarily targeted for free-form product design and structural design (including boats, jeverly, architecture, furniture, vehicles, toys, electronics devices etc), it’s a strange decision to not provide a basic weight measurement tool, despite being on the market for decades. Weight reduction is a crucial part of both the product and structural design. That shortcoming was somehow fixed by someone who wrote the SolidWeight.rvb script for Rhino 5, though. It also works in Rhino 6, but is limited to just one selected object. There is also a “Real materials” script, which also works with both Rhino 5 and 6. However, it requires a separate program such as Apache OpenOffice to be able to see the combined weight of the selected objects in Rhino (Apache OpenOffice: Edit > Paste, then Data > Subtotals > Weight).

If I could write scripts, anyone could. I’m a Tool and Die maker, not a programmer. I’ve got no formal training in programming.


Same here, x10. @Rhino_Bulgaria - jump in.


1 Like

If I could design and engineer car bodies, interiors, invent new suspension type and headlight projectors, anybody could. Jump in. :smiley:

P.S.: It’s funny that brain surgery doctors also consider their job is a second nature. :smiley:

Same here. Modelmaker by trade…

That being said, there is a certain effort to be made (in my case anyway) to get over initial “hump” before it finally clicks and makes sense. But when it does, oh, boy, it unlocks a whole new dimension of tools you can create to customize your workflow in Rhino and do stuff you would never tackle “manually”.

Also, being capable of doing it and actually enjoying doing it are two different things. Some people are just not coding-oriented, so while it’s probably not impossible for them to learn/do, it’s just not a fun thing for them. OTOH, I was convinced that that was my case before I got over that famous hump, but now I do actually like doing it. It’s an intellectual challenge and it’s fun when you actually can design a tool and develop it to your satisfaction.

If it has to be quick, you can make an alias or button for the _-SelName "" macro.
The same goes for selecting all objects of a given name and bypassing the cumbersome pop-up window.
(I understand that this doesn’t solve the “same name as preselected object” question, but that’s what scripts are for).

Same here, naval architect.

@Rhino_Bulgaria, I recently decided to challenge myself and see if I can create airplane fuselage without having any prior-knowledge, other than creating ship hulls.
How are cars any different? Gimme a challenge. :crazy_face:

1 Like

A single car body panel or headlight back panel is more complex to design with NURBS than the entire airplane fuselage. :slight_smile: One of the reasons why I like that kind of work is because it’s a good challenge for me. :smiley: