Select hatch pattern

Hi, I try to crerate a macro for hatching and I can’t assign the pattern

macro:
Hatch Boundary=Yes Pause CombineRegions=No AllRegions Enter Pattern=Solid

And it doesn’t work. If anybody knows how to assign a pattern without python?

Hi -

Where are you running into problems?
Does the following work with your curves:

-Hatch Boundary=Yes Pause CombineRegions=No AllRegions EnterEnd

-wim

I run this in Macro Editor. Your macro works, mine too, but I want macro always select “SOLID” pattern and I can’t do this.

Hi Jeremy - try

-_Hatch _Boundary=_Yes _Pause _CombineRegions=No _AllRegions _Enter _Pattern Solid _EnterEnd

@Jabiexx @wim - I incorrectly had added an underscore before Solid - without it (fixed above) I think this works.

-Pascal

Rhino 7 for Windows. It doesn’t work. Rhino create the hatch but with the previosly used pattern. not SOLID

Hi -

Thanks, I’ve written this up as RH-77243 Annotation: Hatch: Set pattern in macro
-wim

Hi -

It appears that this depends on the input curves. Could you please provide a 3dm file with a few objects that you are trying this on?
-wim

Hi @wim ,

Regarding this track, I’m trying to run a similar macro and I can’t get it to assign a specific hatch pattern, it always takes the last pattern used :
_rectangle _3point _PersistentClose=No _multipause _sellast -hatch _Pattern Solid _Enter _Enter _selprev _delete

hatch.txt (4.6 KB)

Unfortunately, it appears that hatch pattern names have not been localized (looks like a bug or limitation to me)… So Solid or _Solid will not work if you are running Rhino in French. This works in French:

_Rectangle _3point _Multipause
_Sellast -_Hatch _Enter
_Pattern Plein _Enter _SelPrev _Delete

You also do not need “PersistentClose”…

Thanks for your answer,

I’m running it in English, so I assume you mean it won’t work if I run it in English?
Only the French version would work, weird?

Right! It’s a remnant of the same command but with a polyline.

No, you just have to change the hatch pattern name back to Solid to run in English. There is no way to “internationalize” the macro unfortunately.

Ok thanks! I think it’s working now, your macro seems better written. Do line breaks have an influence on macros?

Yes, it acts like a space between words, which is parsed as an Enter. I do it that way simply because I find it easier to read.