Bug in rs.AddHatch()?

Hi, if I run a simple script to hatch a closed curve in a new document then no hatch is generated if a hatch type isn’t defined.

BUT if I make a normal hatch with a solid fill first, then the script works. So is this as expected, or should rs.AddHatch() add a default solid hatch to the document if no hatch pattern is defined?

Cheers

Hi @Holo, by default the patterns are not loaded. But you can check and load. (link)

+1, the default patterns and line types should be accessable without loading.

_
c.

1 Like

Hi @Holo,

I agree.

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

– Dale

2 Likes

we ran into this with one of our hatch tools as well. We ended up just putting
rs.HatchPatternNames()
as the first thing to do when the tool is started.
It loads all the default patterns if none are present. Perhaps not ideal, but it works.

3 Likes