Set the Default Hatch Pattern

Link to original Post at www.autocadtips.wordpress.com

If you have ever used a lot of hatch patterns in a drawing, you’ll understand the frustration of setting a default hatch pattern. Here’s the scenario: Say you use the “SOLID” hatch pattern almost exclusively, so when you are in the hatch pattern dialog box or ribbon you set this hatch pattern as current. The next time you use the hatch command, the “SOLID” hatch pattern is the current hatch pattern and you are happy… But then you close that drawing and come back to it at a later time. When you start the hatch pattern it reverts to the default of “ANSI31” and you have to set the default to “SOLID” again…

This is a frustrating everyday annoyance that has only one solution. And that is to add a “setvar” for this in your acad.lsp file if you have one.

The system variable is called HPNAME (Hatch Pattern NAME)

Beware: When you change this variable from the command line, you are prompted to enter the NAME of the hatch pattern that you want to set as the default but you have no way of navigating to see what hatch patterns are available. So you have to know the name prior to starting the command.
This variable is not store in the registry or in the drawing. That’s why it always resets to ANSI31. So if you want to add a line to your acad.lsp file it will look like this:
(setvar “HPNAME”  “SOLID”)

If you do not plan on using an acad.lsp upon the startup of AutoCAD, the quickest way to set the default hatch pattern is not to use the command “HPNAME” in the command line. The fastest way to simply start the HATCH command or H <enter> and then select the hatch pattern from either the dialog box or ribbon.

About AutoCAD Tips

This blog serves as a knowledge base for myself (and anyone else) so that I can reference tips & tricks that I have learned and also refer others to it as well. I hope that this blog helps you learn at least one tip to make your drafting/design experience better.
This entry was posted in Customization, Hatch. Bookmark the permalink.

7 Responses to Set the Default Hatch Pattern

  1. Michael says:

    Thank you. I just started using the hatch tool. When I clicked on it the first time, I got a full ribbon to customize my hatch. Now when I click on hatch, I only get the hatch defined earlier. How do I get the ribbon back?

    • AutoCAD Tips says:

      This is a good topic as many are going back and forth trying the various ribbon vs dialog box versions of commands.
      I made a post about how to change the hatch interface back to the ribbon here: http://wp.me/p1aURt-xL\

      But the system variable that you are looking for is HPDLGMODE and set it to
      ~Greg

  2. Rana Muhammad Athar Saqlain says:

    Good Morning.

    i add hatch for concrete but when i go to print it it is become black mean no body can see about rebars and concrete. what i have to do?

  3. joey says:

    I mean How to set the default scale value?

    • AutoCAD Tips says:

      (setvar “HPNAME” “EnterHatchPatterNameHere”) ;Set “EnterHatchPatterNameHere” as the default hatch pattern (Not Saved)
      (setvar “HPSCALE” EnterValueHere) ;Set EnterValueHere as the default hatch pattern scale factor(Not Saved)

  4. NICE WEBSITE. NICE CONTENT KEEP IT UP.
    But I am confused about this.
    How to use Autocad Hatch ?

Leave a comment