Wish: Multiple Hatch File Import Option

The dialogue for importing hatches only allows selection of one file at a time.
I know it’s handy to have a bunch of hatches presaved into a .3dm and they will all be imported at once,
but if it’s possible to allow multiple files, it’d still make it much easier in the event that’s not an option.

For example, I’ve got a few folders filled with 100+ Autocad .pat hatch files.

thanks!

I hacked this Python script together quickly, it should import all .pat hatch pattern files in a selected folder. Let me know how it works.

ImportHatchPats.py (1.1 KB)

And just in case, here’s one that allows you to select the files to import from a multi list box…
ImportSelectedHatchPats.py (1.1 KB)

–Mitch

Wow, that was fast. Works like a charm.
Still would be nice to have some more integrated method, but as it is, this solution is worth every penny. :wink:

Hello - added to the heap

https://mcneel.myjetbrains.com/youtrack/issue/RH-49262

thanks,

-Pascal

Thanks Pascal!

hatch.py (446 Bytes)

and try this, Chatgpt wrote these codes and it Works

how to do step by step

  1. Open Rhinoceros 3D.

  2. Open Rhino’s Python editor by either typing the EditPythonScript command at the command line or by clicking the Rhino menu and then going to Python > Python Editor.

  3. Copy and paste the script into the Python editor.

  4. Save the script by going to “File” > “Save” and choosing a filename and location. Note that the file extension must be “.py”.

  5. Close the Python editor.

  6. Go to the command line in Rhino and enter the RunPythonScript command.

  7. Select the script you just saved and click “Open”.

When drag droping a bunch of hatches into Rhino 7, it says “Support for hatch pattern files is coming soon”

…how soon?

Soon is a variable term at McNeel. Could mean tomorrow or 5 years from now… In any case it’s not in V8 (yet). Haven’t tested V9 (but I suspect not yet either).

Maybe these scripts will help for now:

ImportHatchPats.py (1.0 KB)
ImportSelectedHatchPats.py (1.1 KB)

The first one imports all hatch patterns in a given folder, the second allows you to select items within the folder.

Hej Julia -

I’ve added this thread to RH-29081 Hatch: add PAT files by drag and drop

From your message, though, I’m not sure if you know that you can import a bunch of .pat files at once from Document Properties -> Hatch -> Import
-wim

No. I don’t know how to do that. When I follow as your description above, I’m only able to select one hatch at a time. +Shift or +ctr doesn’t work for an example.

Ha, sorry about that, I hopped over the Rhino 7 part.
RH-49262 was fixed two years ago during the development or Rhino 8.
-wim

Seems like a pretty easy fix for a Rhino 7 update then! :smiley: I’ll be waiting. Patiently.

Hej Julia -

We are no longer making changes to V7, unless something catastrophic comes up.
-wim

RH-29081 is fixed in Rhino WIP

RH-64406 is fixed in Rhino WIP