Select Hatch by Pattern Name

Hi all

Is there a way to select hatches by pattern name in Rhino?
This is a pretty straightforward thing in Autocad using the select similar command, but I am not aware of any way to do this in Rhino.

Many thanks!

Patrick

Hi Patrick - here is a python that may help- I think it works OK

SelHatchPattern.py (1.7 KB)

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

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

I see I could have it work from a selection as well, I’ll add that.
@patrick.s.allan - updated the script above to work from object selection.

-Pascal

4 Likes

Wonderful! Thanks a lot.
Having it work from a selection would be a definite plus, although, for the current project I am working on, it looks like there are several hatch patterns for what should essentially be the same hatch, so the tick boxes will probably come in handy.

Hi I tried running python script using macro
How do I get this to operate properly?

image

image

Hello - if this does not work

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

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

I am not sure what to suggest…

-Pascal

Oh ok ‘RunPythonScript’ works but I wanted to set a macro to make it easier and quicker for me.
Macro doesn’t seem to work properly though.

Thank you!

I also write a C# version. feel free to use the RHP, should be selsameblock.

AiMoExport0528.rhp (39.5 KB)