Order that hatches are displayed in

Hey guys,

Does anyone know what determines how the order that hatches are displayed in the hatch dialogue box is determined? It doesn’t seem to be alphabetical and I am trying to make my most frequently used hatches appear at the top.

Thank you.

Cosmas

@cosmas,

the order is index in the hatchpattern table. I´ve tried a view things but changing or swapping this index seems not to be possible. Apart from this, i think a few hatch related things are broken, in V5 and the WIP.

@pascal, please try this in V5:

  1. Open new empty file
  2. From Document Properties > Annotation > Hatch delete “Solid”
  3. Click “OK”, Rhino asks if you want to delete current pattern, choose OK again
  4. Reopen the dialog, now “Solid” appears at the end of the list ?

If i do above or similar things in the WIP, strange things happen, i´ll create a new thread for that.

c.

Thank you @clement,

Anything we can do to remedy this would be appreciated. Some of us have dozens of hatches in our program and scrolling through them, as you can imagine, would be much easier if there were ways to organize them. Alphabetical or consecutive so if your hatch name has a number (1-Wood, 2-Brick etc.) it then follows that protocol, would be great.

Thank you.

I’m cc’in @Mary, too, cause I know how involved she is with the layout features.

@Pascal – your thoughts would be really, really be appreciated.

@cosmas, i second that wish to order them or change the ordering from within the dialog. For the moment, i guess the best you can do is to create a few buttons to assign the most used patterns with a single eg:

_-Hatch _Pause _Boundary=No _Pattern=Grid _Rotation=0 Scale=1 _EnterEnd

c.

Thank you, Clement. it’s just that there are so many…

@cosmas, try below quick script. If you want your most used hatch pattern names appear at the top of the list, you’ll have to name them, eg with leading numbers or alphabetically:

AssignHatch.py (1.4 KB)

c.

Wow, @Clement, thank you! I haven’t tried it yet, but I will later this afternoon.

Thank you very much.

Hey @clement

I wonder if you could tell me exactly how the Assign Hatch python works? I see your instructions “try quick script. If you want your most used hatch pattern names to appear at the top of the list, you’ll have to name them, eg with leading numbers or alphabetically.” … but when I run it, I’m not getting any dialogue that would allow me to change their names. Basically nothing happens…

Thanking you in advance…

Cosmas

@cosmas, the script i’ve posted 2 years ago is to assign hatch patterns not to change their names. This has to be done in Rhino. The script pops up a dialog in which the patterns are listed alphabethically, it was only tested in Rhino 5.

I see that in Rhino 6.
_
c.

@alain, @dale, there seems to be a problem in Rhino 6 getting hatchpatterns from table. eg:

for hp in scriptcontext.doc.HatchPatterns:
        print hp.Name

or this:

for hp in scriptcontext.doc.HatchPatterns.GetEnumerator():
        print hp.Name

does not print anything. Both work in Rhino 5.

_
c.

@clement, @alain, @dale, any help you can give us on the subject would really be appreciated. Can anyone explain to us what the order is of the hatches that appear in the Hatch dialogue?

@cosmas, i guess it is the index in the hatch pattern table, in V6 it looks like below if the Hatch page in the DocumentProperties has been opened at least once:

Solid (0)
Hatch1 (1)
Hatch2 (2)
Hatch3 (3)
HatchDash (4)
Grid (5)
Grid60 (6)
Plus (7)
Squares (8)

_
c.