Categories

AutoCAD 2013 & AutoCAD LT 2013 Bible

The most comprehensive AutoCAD book around!

AutoCAD 2012 Bible

Creating custom hatch patterns

While AutoCAD comes with a large variety of hatch patterns, you can also create your own. This feature has been around for many years.

Hatch patterns are stored in files with a file extension of .pat. You can add your hatch to the default acad.pat or create your own .pat file. As always, don’t forget to make a copy of acad.pat or acadlt.pat before you edit it.

If you create your own .pat file, here are some points to remember:

  • If you aren’t adding patterns to acad.pat or acadlt.pat, you can put only one hatch pattern in a custom .pat file; the filename and pattern name must be the same
  • You can insert comments in your .pat file after a semicolon
  • You must press Enter after the end of the last line of the hatch definition

Note: To find the location of acad.pat or acadlt.pat, right-click the drawing area and choose Options; then click the Files tab. Double-click the Support File Search Path item to display the location of the support files.

The syntax for hatch patterns is as follows:

*pattern-name[, description]

angle, x-origin,y-origin, delta-x,delta-y [, dash1, dash2, ...]

Hatch-pattern definitions have a few rules:

  • The description is optional; if you include one, precede it with a comma.
  • Add the dash specifications only for noncontinuous lines.
  • You can have more than one definition line (the second line in the syntax I just showed), creating sets of hatch definitions that combine to create the hatch pattern.
  • Each definition line can be no more than 80 characters.
  • You can include a maximum of six dash specifications (which include spaces and dots).
  • You can add spaces in the definition lines for readability.

This following explains the meaning of the terms in the definition:

  • Angle: Defines the angle of the lines in the hatch pattern. If you also specify an angle in the Boundary Hatch and Gradient dialog box when you place the hatch, AutoCAD adds the two angles.
  • X-origin: Specifies the X coordinate of the base point of the hatch pattern. Your hatch probably won’t go through 0,0; however, this point lines up sets of lines in hatch patterns, as well as aligning hatch patterns in different areas. Because all hatch patterns are calculated from the base point, they’re always aligned, no matter where they actually appear in the drawing.
  • Y-origin: Specifies the Y coordinate of the base point of the hatch pattern.
  • Delta-x: Specifies the offset of successive lines. This applies only to dashed lines and is measured along the direction of the lines. Specifying a delta-x staggers each successive line by the amount that you specify so that the dashes don’t line up.
  • Delta-y: Specifies the distance between lines, measured perpendicular to the direction of the lines. This applies to both continuous and dashed lines.
  • Dash: Defines a noncontinuous line using the same system as linetype definitions: positive for a dash, negative for a space, and 0 for a dot.

Let’s look at a couple of examples.

*ftrailer, proposed future trailers
105, 0,0, 0,0.5, .5,–.25,0,–.1,0,–.25

This hatch has an angle of 105 degrees, an origin of 0,0, a delta-x of 0, a delta-y of 0.5 (the spacing between lines), and then defines a non-continuous linetype (dash, space, dot,space,dot,space)

Here’s a more complex example:

*trail, whole trailers-proposed
0, 0,0, 0,2, .5,–1
90, 0,0, 0,1.5, .5,–.25,0,–.25,.5,–.5
90, .5,0, 0,1.5, .5,–.25,0,–.25,.5,–.5
0, 0,1.5, 0,2, .5,–1

This hatch pattern has 4 lines. Two are at 0 degrees, and two are at 90 degrees. This creates the rectangular shape. The difference between the two lines that start at 0 degrees is their origin. The second one starts at 0,1.5. The 90-degree lines also have different origins. The linetype for the 90-degree lines is dash, space, dot, space, dash, space.

See how the effect of trailers is created?

Related tips:

Create a custom simple linetype
Control hatch origin
Easy hatching
Dealing with gaps

65 comments to Creating custom hatch patterns

  • M.S.M. Hussain

    Hi i want what how to creat my own hatch in Auto cad 2007

  • Ellen

    The instructions here work for AutoCAD 2007. In fact, the hatch code specifications go back many years.

  • Andreq

    Hello, i have to make squares 50X50 cm, can you give me some tips please?

  • Ellen

    Do they need to fill in a closed space? If not, you wouldn’t use a hatch. Even if you would, I’m not sure you wouldn’t be better with an array of lines. It’s hard to know without any context.

  • azi

    hello. can anybody explain me how can I add an installed pattern to my autocad pattern’s library pls??(i use version 2007) thx all.

  • Ellen

    I’m not sure what you mean. If you add a custom pattern to acad.pat, it becomes part of the AutoCAD pattern library. What do you mean by “installed?”

  • Reem

    Hii.. How can use a hatch pattern (which is in .Pat)and it is already downloaded in my computer ? in other words I can’t find the downloaded pattern in AutoCAD file. plz help.. Thank youu :D

  • Ellen

    If you put it in the support file search path, you can find it when you go to hatch something. On the ribbon’s hatch gallery, custom files are at the bottom if they’re in the search path.

  • Create new Hatch

    i need to know how to create a new hatch patterns in AutoCad.

    thx
    prem

  • Robert

    I would like to create a hatch which is simply blank. I would use this to hide an area of a drawing so that I can place a title block on a normally hidden layer. When I turn the layer on, the features behind the title block will be hidden and only the text in the title block will appear. Any suggestions would be appreciated.

  • Ellen

    I’m not sure I understand, but would the TEXTMASK command help? It creates a wipeout behind the text and helps to make text on top of a hatch more legible. The WIPEOUT command might also help. And the TEXTTOFRONT command will, well, it’s obvious.

  • Hijitaka

    Hi Ellen,

    I’m not understand about your explanation, i come here to find a way to make the pattern that i was made, for use in another time, as hatch if possible,
    so who care about angle?? array give we all magic to make some awesome pattern,

    and what it is about syntax?? is that really difficult to make some pattern become usable hatch?? lol, maybe i just need to uninstall my Autocad,

    thanks before

  • Ellen

    Yes, you make it for use another time by saving in a .pat file. Then, when you want to use the hatch, you can choose that file and you’ll be able to create the hatch. The hatches are created using text. There may be some way to convert a pattern you draw to a hatch pattern, but I don’t know of it– perhaps someone has written a program to do that. But in AutoCAD, you have to use their syntax.

  • bea

    Tengo el autocad 2010 y me aparece la leyenda acadiso.pat, can´t find file. No standard patterns available. Sabés como puedo hacer para recuperarlos?
    Gracias.

  • cuckoo

    Thanks for this awesome instruction. I finally understand what those numbers mean.

    However, I have tried to create a pat file where I copy and paste two pat files together (Concrete and Leaves pattern) to simulate an obscure glass. and the pattern gives me the error message in AutoCAD. Can you please explain? and any tips for making such pattern work?

    Thanks

  • Ellen

    I’m not sure how you could put to .pat files together.

  • cuckoo

    Hi Ellen:

    What I meant was, I opened two pat files in text editors, then cut and paste all those numbers together and saved it as a new pat file. I was hoping these would make 2 patterns work together but it gives an error message.
    Base on your instruction, I would think it would work.

    Do you have any suggestion? Thanks

  • Romany

    Hi Ellen,
    Please tell me how to use a photo to create a new hatch pattern?
    thanks

  • Ellen

    I’m not aware of a way to use a photo to create a hatch pattern. However, you can use a photo as a material to fill in a side of a 3D object. That’s another topic.

  • John

    Hello, I am having difficulty trying to get a herringbone pattern configured. I have been going over things to try and get it to work, but I am just now getting frustrated. I just need a 1.75″x8″ herringbone pattern. I have already created a 4×12 and an 3×12, but for some reason I can not get this one to work. Any help would be greatly appreciated. I don’t care if is angled at 0 & 90 or 45 & 135, I just need to get it to work. Thanks

  • Ellen

    Does anyone want to help John create a custom herringbone pattern?
    John, You might search on the Internet–sometimes people share their work.

  • Steve

    Use the Express Tool SUPERHATCH to create a hatch from an image.

    SUPERHATCH works like the hatch command, but it allows you to use an image, block, xref, or WIPEOUT object as a hatch pattern.

  • Ellen

    Great idea!

  • vinoth

    @romany … try in superhatch command…

  • vinoth

    @ Ellen.. Maam same doubt can’t rectified… i have download the hatch patten can u tell me where to paste the hatch… i’m using autocad 2012. thank you..

  • Ellen

    If you put the .pat file in AutoCAD’s support file search path, it will appear at the bottom of the list of hatch patterns. In the Patterns panel of the Hatch Creation tab, click the arrow at the right of the thumbnail images and scroll to the bottom. Then you can choose that hatch to fill an enclosed area.

  • John

    Thanks Ellen, I have already searched far and wide, before I posted help. Usually I can figure it out, but for some reason, this one is kicking my butt. I have created 4×12 and 3 x 12 herringbone patterns recently, but I just can not get the 1.75×8. I will more then be happy to post one or two to get one in return! :)

  • Chris

    John, in theory any herringbone should be able to be duplicated with one horizontal family of lines, and one vertical. In practice, I don’t think it works. But first, I hope I’m right in assuming you’re talking about each rectangle/paver being 1.75 units x 8 units? If so, then my belief is it’s not your fault – it’s that the pattern doesn’t repeat itself for a very long time. To use only two line definitions we need to have a very large “off” distance (9.75 ON, then 102.25 OFF), and having experimented, I believe Autocad chokes on this – for some reason I’ve never understood it often struggles to “cut” a dashed line unless the line happens to have an “on” bit nearby, so this particular hatch you’re wanting is a worst-case scenario.

    If you can handle nudging your proportions into a shape where the smaller side divides more neatly into the larger (eg 2 units x 8 units), then the lines will repeat/align much sooner in the pattern and it should work for you. The following worked for me (Save it into a file named herrinbone2x8.pat )

    *herringbone2x8,Herringbone 2 x 8 units
    ;angle, x,y-origin, delta-along-line, delta-between lines, dash-1, dash-2, …
    ;Line family 1 – horizontals
    0, 0,0, 2, 2, 10, -6
    ;line family 2 – verticals
    90, 2,0, 2, -2, 10, -6

    Good luck. Autocad patterns are one of the most bizarrely archaic things I know. (especially considering I just made a new crazy paving hatch in Archicad! :)
    Chris

  • Chris

    Whoops, missed a ‘g’ in the filename – that should have read herringbone2x8.pat, not herrinbone2x8.pat

  • Chris, we have a free excel AutoCAD hatch generator tool on our site that will allow you to design the pattern of your choice. see http://www.cadhatch.com/#/hatch-generator-tool/4558761903

    Dave

  • I need the video of using custom hatch pattern in auto cad.

  • Ahmed

    Dear Sir/Madam,

    before i was using Auto CAD 2007 and that was perfect.
    i used to isolay comment for hiding all layer except which i want in the same version. now i am using 2011 version, that isolay comment is not working while using 2011. can you help me for the same….

    awaiting for your reply

    regards,

    Ahmed…

  • Joe P

    I’ve added the code to my existing .pat file and I’ve saved the woodgrain .pat files under the support folder and I still can’t get the option when I’m trying to hatch. Does this not work in LT?

  • Ellen

    Hmmm, not sure. I don’t have LT to test it.

  • jestin

    i want change layer value delta Y “0″
    delta z “0″

    that possibile????

  • Marcos

    Hello! I need to create a hatch of 60×60 squares that has a sando fill behind. I don’t want to add it at ACAD.pat, I want it to be a new file… How Can I do that? Thanks!

  • MrJMan

    Ellen,

    I have created my simple custom diamond hatch and it does not showup in model space when install it. It shows up in the hatch window area okay but I get a “Missing paramters on line 3.?” when I install it. see below, what have i done wrong?

    MrJMan

    *Diamond,Diamond
    71, 0,0, 0,.125
    109, 0,0, 0,.125

  • Manny

    How do i make my own hatch pattern that will follow a certain path? example i need to put stone pavers following a curved pathwalk?

  • Ellen

    I believe that for years, AutoCAD has come with a tutorial to do just that using AutoLISP. Look in Help under customization.

  • JYodak

    This is a very interesting pattern, and not a terribly easy one to solve. Many, many years ago I spent a bit of time developing all of the AR-* patterns, so have a bit of knowledge about this, though it has been a long time. There is a 15″ repeat each way, but since 8 does not divide evenly by 1.75, as pointed out in an earlier post, you have to find the larger repeat, and use that. This turned out to be 214.25 though I have yet to figure out why. 14 x 15 = 210 and the three full tiles is 5.25. Adding these would be 215.25. Our offset is -1 each time, so this would account for it, but did I just get lucky???

    *herringbone175x8,Herringbone 1.75 x 8 units
    ;; 14 rows and columns required.
    ;; angle, x,y-origin, delta-along-line, delta-between lines, dash-1, dash-2,
    ;; Line family 1 horizontals
    0, 0, 0, 1.75, 1.75, 9.75, -214.25
    0, 15, -1, 1.75, 1.75, 9.75, -214.25
    0, 30, -2, 1.75, 1.75, 9.75, -214.25
    0, 45, -3, 1.75, 1.75, 9.75, -214.25
    0, 60, -4, 1.75, 1.75, 9.75, -214.25
    0, 75, -5, 1.75, 1.75, 9.75, -214.25
    0, 90, -6, 1.75, 1.75, 9.75, -214.25
    0, 105, -7, 1.75, 1.75, 9.75, -214.25
    0, 120, -8, 1.75, 1.75, 9.75, -214.25
    0, 135, -9, 1.75, 1.75, 9.75, -214.25
    0, 150, -10, 1.75, 1.75, 9.75, -214.25
    0, 165, -11, 1.75, 1.75, 9.75, -214.25
    0, 180, -12, 1.75, 1.75, 9.75, -214.25
    0, 195, -13, 1.75, 1.75, 9.75, -214.25
    ;; line family 2 verticals
    90, 1.75, 0, 1.75, -1.75, 9.75, -214.25
    90, 16.75, -1, 1.75, -1.75, 9.75, -214.25
    90, 31.75, -2, 1.75, -1.75, 9.75, -214.25
    90, 46.75, -3, 1.75, -1.75, 9.75, -214.25
    90, 61.75, -4, 1.75, -1.75, 9.75, -214.25
    90, 76.75, -5, 1.75, -1.75, 9.75, -214.25
    90, 91.75, -6, 1.75, -1.75, 9.75, -214.25
    90, 106.75, -7, 1.75, -1.75, 9.75, -214.25
    90, 121.75, -8, 1.75, -1.75, 9.75, -214.25
    90, 136.75, -9, 1.75, -1.75, 9.75, -214.25
    90, 151.75, -10, 1.75, -1.75, 9.75, -214.25
    90, 166.75, -11, 1.75, -1.75, 9.75, -214.25
    90, 181.75, -12, 1.75, -1.75, 9.75, -214.25
    90, 196.75, -13, 1.75, -1.75, 9.75, -214.25

  • Ellen

    Yes, complex patterns can take a long time to figure out! Thanks for posting this.

  • hamidullah

    what is hatch commond for glazing

  • Ellen

    Do you mean ‘what is the hatch command for glazing?” or “What is the common hatch for glazing?”
    I don’t know what hatch is usually used for glazing, but perhaps a reader will know & reply

  • Garrett

    Ellen,
    I’m new to creating custom hatches. I believe you instructions make sense, however, I can’t even get to that point. I found the user defined hatch patterns fine, however, even when I copy a hatch within that folder and don’t change or even open the file, autocad won’t load the hatch. in the hatch Manager it shows that the file exists, however, doesn’t load the actual hatch and is not usable. Any thoughts/advice? Thanks.

  • Manny

    @JYodak;

    if i save this as .pat will it follow a curved path?

    @Ellen
    can you show where in customization that is? i have been working on cad for years now and i haven’t come to this till now

  • Manny

    @JYodak;

    i tried your hatch pattern it says missing parameter on Line 33

  • Marty

    Ellen,
    Do you know of a way that will allow the inclusion of text into a hatch pattern?

  • Ellen

    No, but you can include text in a complex custom linetype

  • Manny

    @Marty

    you can use Expresstools SUPERHATCH instead

  • Satheesh Kumar

    Mam,
    Does this work for Acad-2010, If not what is the procedure for the same & if possible add a vedio.

    Thanks in advance
    R.Satheeshkumar

  • Ellen

    The procedure for creating a hatch pattern definition hasn’t changed.

  • Faragello

    Hi
    i want cereat hatch with arcs how can i make that?
    Possible to send us your video contains an explanation of how to work

  • Ellen

    By definition, a hatch can only have lines and dots.You could perhaps define a shape and make an array of the shape or just draw an arc and array it.

  • Sreekumar

    How I can create hatch lines with diffrent colour.

    Thanks

  • Ellen

    Each hatch is one object, so you can’t. You would have to explode it or create interweaving hatches. I’m not sure what your hatch looks like, but multilines can create parallel lines of different colors.

  • maha

    THanks Ellen for your informative site, I have downloaded some free hatch patterns from the net and when I put in this folder (where i found the aacad.pat File)C:\Autocad 64\x64\pt-BR\acad\Acad\Program Files\Root\UserDataCache\Support the new patterns does not appear at all and also if say i have ten custom patterns can i put them in one file (i have no experience at all in customizing autocad)

  • Ellen

    Yes, you can add them to the existing acad.pat. Be sure to back it up first!

  • Hassan

    Hi Ellen,
    I would like to hatch similar objects (boxes)in a one go to save time. each object (box) is parallel to a section of the highway centreline (snake shaped) what is the best way?
    changing each time the UCS for each box and then hatching each separately seems time consuming.
    any suggestions please

  • Ellen

    Hassan, I don’t know which release of AutoCAD you’re using, but I think you can hatch multiple closed objects at one time.

  • Hassan

    Yes, I know you can hatch at one time (am using 2011) but the aim is, since the rectangular boxes face different directions, the hatching of all at once with a single UCS (e.g. world)will make to some boxes hatched with angular inclination to their sides. (already their sides were not parallel to the UCS world coordinate axis). I might be wrong, please give me a hint

  • Ellen Finkelstein

    Hassan,
    Perhaps you could create a script or AutoLISP routine that would let you input the angle and hatch at the right angle. If you have set angles, you could save them in a tool palette.

  • adam

    i am trying to combine a concrete hatch and a wood hatch to make a new CMU Hatch in plan. The problem i am having is that the default size for the wood hatch is smaller than the concrete hatch. is there a way for me to modify the scale of the wood watch (like x5)?

  • Darren Allen

    How come I cannot grab and drag a solid or gradiant hatch to a tool palette but I can all other hatches?

  • farag

    When I preview a drawing in the File > Open dialog box (Autocad 2008) I can see 2 layers that do not show up in the drawing. I have turned on and thawed all layers, and all Xrefs have been updated, and their file paths are current. How can I find and show these layers in the drawing? This is happening to the same layers in 2 different drawings.

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>