SelName is certainly helpful, thank you! However, when this list gets longer and I am looking for a substring, I was hoping that a find method could help out as well. Since I am using a naming convention, I might want to select all objects that contain a *TA* or a W7*. Does this make sense?
Here is a relatively simple script that may help -
It puts up a stringbox on the screen where you can type the search term. It allows for * as wildcards at the start, end or both start and end of the search string (not in the middle though). It will select all objects that have object names corresponding to the criteria. If no wildcard is used, the object name and the entire search string must match exactly. It is not case-sensitive (but can be made so). It will report the number of objects selected and also if any matching objects are locked, hidden or are on locked or off layers.
More sophisticated searches could be made with regular expressions, but perhaps this may be enough for you…
I learned about aliases and tried to run the script as an alias but for some reason I do not get the popup this way. Here is what I did:
On my Mac, I copied the script inside the library folder: /Users/dstaiger/Library/Application Support/McNeel/Rhinoceros/Scripts/SearchSelectObjName.py and restarted Rhino. Then I created an alias “FindByName” and set it to ! _-RunPythonScript SearchSelectObjName.py.
When I now use Cmd-K to run the alias, nothing happens other than a message displaying at the bottom in the status bar: Python Script <SearchSelectObjName.
I also tried variants without a .py ending and with/without “”, but still no luck.
Ah, so that means simply that the script is in the wrong folder… Hang on, going to check that now (for 6.0 at least).
OK, I can confirm that it’s working - thanks Alain! I will update the Wiki page and the Discourse topic (if I can) with this info…
Edit: Wiki page updated.
@wim - the Discourse post on this page - which people seem to find as per above - has information that needs to be updated. As the first post is two years old, I can no longer edit it, and putting new info with corrections at the bottom of a long thread will not be found easily… Any way to be able to edit that first post with the new info?