Find by name

When I try to deploy this script I get the following error message:

I’m sure it is easily to remedy. It’s just that I’m clueless in programming.

Yes, this was a programming error on my part, it assumed that something matching would be found. If not, it errored out during the reporting part. Here is a revised version to test:

SearchSelectObjName.py (2.8 KB)

This is very helpful! Thank you very much!
You are an absolute star in this community.
Is there a way to buy you a coffee or an address to send a Christmas present to?
You can reach me under office@me.eigenstetter.com.

Thanks for the kind thoughts, but really no recompense is necessary - like most of the other ‘regulars’ that are on the forum daily and answer questions, the reward is just hanging out in here and the satisfaction of having been able to help.

3 Likes

I don’t know if this has been discussed but if you run -selname instead of _selname this give you the option to find your part specifically in the rhino model
-SelName
part-name

the part name has to be started with the * and ended with *

Hi. Just tried this script and seems that the error persists if nothing is found:

SearchSelectObjName.py_Error

Yep… Try this one.

SearchSelectObjName.py (2.8 KB)

1 Like

Thank you for the updated script. Much better without any errors so far.

Thanks for this script. I added rs.AllObjects(include_references=True) to line 50 so I can search for objects in Worksessions. Posting in case anyone else finds it useful.