November 2, 2018, 5:49am
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.
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)
November 2, 2018, 4:20pm
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.
November 2, 2018, 6:15pm
hatch.py (446 Bytes)
and try this, Chatgpt wrote these codes and it Works
how to do step by step
Open Rhinoceros 3D.
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.
Copy and paste the script into the Python editor.
Save the script by going to “File” > “Save” and choosing a filename and location. Note that the file extension must be “.py”.
Close the Python editor.
Go to the command line in Rhino and enter the RunPythonScript command.
Select the script you just saved and click “Open”.