Jump to content

Loading a new hatch


Recommended Posts

Posted

My boss recently gave me a USB with a huge amount of hatches on it.

The hatches are in .pat format.

When I opened up AutoCAD (the version I have is AutoCAD Civil 3D 2011), and typed in "hatch" to have a look at the hatch creation properties box, I can't find where to load a hatch. I am also a bit confused as to where I should save all these new hatches so I can access them easily in the future.

 

Any help would be greatly appreciated :)

Thanks

Posted

You should add the path where those hatches are stored into the Support File Search Path list (in Options --> Files). After will be able to find them in Custom tab of hatch patterns palette.

If I be in your shoes, I will create a dedicated folder for my custom hatch patterns (i.e. C:\\MyHatches) instead of relying on the USB drive. This folder may receive later other custom patterns. If you have more than one AutoCAD seat in the office, then that folder may be a shared network one, to allow all people to access the patterns.

Posted

Thanks MSasu for your response :)

 

I followed your directions as to where to load my files (Options, Files, Support File Search Path List), and that looked like it went ok. (Thanks for you tip about not working off the USB. I have since made a folder designated to the hatches on my computer.)

 

When I draw a typical box and type "hatch" in the command line the typical hatch properties takes over the ribbon and it consists of: boundaries, pattern, properties, origin, options and close.

 

When I click on pattern, and scroll through (past the standard brick and concrete textures), I arrive at my hatches at the end. However.... the correct names of the hatches appear, but the preview box is white with a red line diagonally through it. When I try and click on the hatch to load it, it automatically reverts back to one of the existing standard hatches AutoCAD comes with.

 

I have no idea what i've done wrong :S Any help sorting this out would be much appreciated :)

Posted

Thank u Pablo for that link, it looks like that person was having the same problem I am currently having.

 

 

Hugh's response I think may be able to help me, but I am still a little confused :S

Hugh's response:

I assume by custom pattern button you mean 'User defined' which is where I found them but the box still just displays the name of my custom hatch and shows a red line through the box and wont let me actually select it

 

Looks like a problem within the .PAT file itself.

 

Check the pattern name is the same as the filename as eldon mentioned - file X.PAT should contain pattern named X.

Only ONE pattern per .PAT file (More than one pattern is allowed ONLY in ACAD.PAT and ACADISO.PAT).

There should be a blank line at the end of the file.

All lines in the file should be

Each line should be terminated with a cr/lf character pair.

 

The person who started the thread is experiencing the same "red line" problem I am. When I look at the pattern name in AutoCAD it comes up as "._CUTSTONE ", where as in the actual folder the file is named "CUTSTONE.pat"

 

Is this what Hugh and Eldon are talking about in terms of making sure the names are the same? If this is the case, I am unclear on how to change the name of the file, and what to change it to :S

 

Feel like such a dummy right now :(

Any help would be greatly appreciated :) Thanks :)

Posted

.pat files are simple text files that can be edited with a text editor such as Notepad[1] or PSPad.

 

Open the pattern file with a text editor. You should see one kie (and one line only) in that file commenting with an asterisk "*" e.g:

 

*CUTSTONE,some comment

...

some lines containing nothing but numbers, none greater than 80 charracters wide

...

 

The file name should match the pattern name ie CUTSTONE should reside in a file called CUTSTONE.PAT stored in a folder known to your support file search path as set up in your ACAD's Tools>Options.

 

read through this:

http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/index.html?url=WS73099cc142f4875513fb5cd10c4aa30d6b-7e57.htm,topicNumber=d0e368209

 

to see why you can't have a pattern named ._CUTNAME :roll: so don't try.

Files called ._ tend to float over from the MacOS side of things and chances are they are not readable in Notepad. If so, look elsewhere for the PC equivalent. It may even be on that USB you mentioned.

 

hth

Hugh Adamson

www.hatchkit.com.au

 

[1] Notepad tries to save any file to a text file having a .txt file extension. Set "Save as type" to "All Files (*.*)" to ensure it doesn't as ACAD only sees files ending with the .PAT file extension.

Posted

Thanks Hugh for that :)

 

I was able to open the file CUTSTONE.pat in notepad and this is what I got:

 

*CUTSTONE, Cut stones

0, 0,0, 0,1, .75,-.25

0, 0,.05, 0,1, -.3,.3,-.15,.25

0, 0,.1, 0,1, -.45,.55

0, 0,.15, 0,1, .45,-.55

0, 0,.2, 0,1, -.2,.8

0, 0,.25, 0,1, .35,-.25,.3,-.1

0, .35,.3, 0,1, .8,-.2

0, -.05,.35, 0,1, .55,-.45

0, -.2,.4, 0,1, .45,-.55

0, 0,.45, 0,1, .8,-.2

0, 0,.5, 0,1, -.4,.25,-.15,.2

0, .5,.55, 0,1, .6,-.4

0, .1,.6, 0,1, .4,-.2,.15,-.25

0, .3,.65, 0,1, .4,-.15,.25,-.2

0, .7,.7, 0,1, .6,-.4

0, .3,.75, 0,1, .4,-.6

0, .5,.8, 0,1, .45,-.55

0, .5,.85, 0,1, -.3,.7

0, .2,.9, 0,1, .3,-.7

0, .5,.95, 0,1, .7,-.3

90, 0,.4, 0,1, .15,-.4,.35,-.1

90, .1,.45, 0,1, .25,-.15,.1,-.5

90, .15,.25, 0,1, .1,-.9

90, .2,.15, 0,1, .1,-.6,.15,-.15

90, .25,.35, 0,1, .1,-.9

90, .3,0, 0,1, .15,-.45,.25,-.15

90, .35,.2, 0,1, .15,-.85

90, .4,.45, 0,1, .15,-.05,.1,-.7

90, .45,.05, 0,1, .15,-.85

90, .5,.3, 0,1, .15,-.05,.15,-.1,.25,-.3

90, .6,.3, 0,1, -.7,.1,-.1,.1

90, .65,.45, 0,1, .1,-.9

90, .7,.1, 0,1, .1,-.35,.25,-.3

90, .75,.25, 0,1, .05,-.65,.15,-.15

90, .8,.3, 0,1, .25,-.25,.15,-.35

90, .85,.55, 0,1, .15,-.25,.1,-.5

90, .9,.2, 0,1, .1,-.9

90, .95,.3, 0,1, .1,-.3,.15,-.45

 

following what you said and reading the link you attached I believe this is what the .pat file was meant to look like.

 

What I am now confused about is the next step :S

I can't see what is wrong with the file above and so can't understand why AutoCAD loads a box with a red line through it, instead of the intended hatch

 

I feel like I am missing something very obvious :S

Posted (edited)

That patttern works for me, but is very small, fitting in a 1x1 box. Hatching large areas takes an appreciable amount of time. What is your base scale? I'm not a C3D user so it's pure supposition on my part that you are being warned off using it at its natural scale in your drawing.

 

Here's CUTSTONE scaled up x1000;

 

*CUTSTONE1000,Cut stones

;-------------------------------------------------------------------------------

; Pattern written by HatchKit v2.7 Hatch Pattern Editor

; HatchKit v2.7 Hatch Pattern Editor© Cadro Pty Ltd 1990-2013.

; www.hatchkit.com.au

;-------------------------------------------------------------------------------

;-Template=CUTSTONE, Cut stones

;-Source =G:\Users\Hugh\Desktop\ProblemHatches\CUTSTONE1000.PAT

;-Date =11/04/2013

;-Time =1:25:01 PM

;-HatchKitVersion=2.7.1.1995

;-------------------------------------------------------------------------------

90,750,250,0,1000,50,-950

90,700,100,0,1000,100,-900

90,250,350,0,1000,100,-900

90,650,450,0,1000,100,-900

90,400,650,0,1000,100,-900

90,600,1000,0,1000,100,-900

90,600,1200,0,1000,100,-900

90,850,950,0,1000,100,-900

90,900,200,0,1000,100,-900

90,950,300,0,1000,100,-900

90,100,850,0,1000,100,-900

90,200,150,0,1000,100,-900

90,150,250,0,1000,100,-900

0,700,600,0,1000,150,-850

90,400,450,0,1000,150,-850

90,0,400,0,1000,150,-850

90,350,200,0,1000,150,-850

90,300,0,0,1000,150,-850

90,200,850,0,1000,150,-850

90,800,800,0,1000,150,-850

90,750,950,0,1000,150,-850

90,950,700,0,1000,150,-850

90,850,550,0,1000,150,-850

90,500,500,0,1000,150,-850

90,500,300,0,1000,150,-850

90,450,50,0,1000,150,-850

0,800,500,0,1000,200,-800

0,400,500,0,1000,250,-750

0,850,650,0,1000,250,-750

0,750,50,0,1000,250,-750

90,300,600,0,1000,250,-750

90,100,450,0,1000,250,-750

90,500,750,0,1000,250,-750

90,800,300,0,1000,250,-750

90,700,550,0,1000,250,-750

0,200,900,0,1000,300,-700

0,300,50,0,1000,300,-700

0,600,250,0,1000,300,-700

0,0,250,0,1000,350,-650

90,0,950,0,1000,350,-650

0,100,600,0,1000,400,-600

0,300,750,0,1000,400,-600

0,300,650,0,1000,400,-600

0,-200,400,0,1000,450,-550

0,0,150,0,1000,450,-550

0,500,800,0,1000,450,-550

0,450,100,0,1000,550,-450

0,-50,350,0,1000,550,-450

0,500,550,0,1000,600,-400

0,700,700,0,1000,600,-400

0,800,850,0,1000,700,-300

0,500,950,0,1000,700,-300

0,0,0,0,1000,750,-250

0,0,450,0,1000,800,-200

0,350,300,0,1000,800,-200

0,200,200,0,1000,800,-200

 

But first, double-check that there is a blank line at the end of any .Pat file you save.

 

Turn off hatch quick preview? Setting HPQUICKPREVIEW to OFF will disable this feature:

http://autodesk.blogs.com/between_the_lines/2010/04/autocad-2011-feature-tips-tricks-10-new-hatch-tips.html

 

I'm running out of ideas but please keep posting. A screenshot showing the error would be very handy.

Edited by hugha
added text
Posted

Thank u so much for helping me out with this Hugh, I really appreciate the help! :)

 

Ok, so I copied ur CUTSTONE1000 text into a notepad document and saved it as a .pat

I then made a new folder on my desktop just for the CUTSTONE hatch. I then linked it to my CAD file through Options, Support File Search Path etc

I then closed and re-opened my document (just in case it had to load or something)

When I re-opened my document I drew a simple box and typed "hatch"

The hatch ribbon showed up and i scrolled down through the hatches to find the CUTSTONE1000 hatch at the end (see attached JPG).

This is the first time that there has been a graphic in the small preview of my attached hatches. Normally all I can see is a red line (as you can also see in the attached JPG).

When I clicked inside the box as I normally would to hatch an object, the object selected and became outlined with a dashed line (again, you can see in the JPG)

All seemed well and good.....HOWEVER, when I pressed "enter" as I normally would, the selection cancelled itself and i was re-directed back to the home ribbonHatch Issues.jpg

 

No idea what is going on now :S

Posted

Forgot to mention, I went through a random bunch of the .pat files that I have and they all had a blank line at the end of them :)

Posted

So while I was busy hatching my section with hatches AutoCAD comes with, one of the brick hatches didnt work. It would outline the selected area in a dotted format (like I mentioned was happening with the cutstone hatch) and then when I pressed enter it would disappear. I decided to try a few different scales of the brick hatch and when I typed in 0.01 into the scale the hatch showed up.

I thought maybe if I applied the same principal to the CUTSTONE hatch, maybe I could get it to work......AND IT DID!!!

I drew a large box and typed the scale as 0.01 and the CUTSTONE hatch filled it up :)

 

(must do a happy dance *dances* because I was starting to think I would never get to this point)

 

So the 2 questions I have following on from this are:

 

1.

Is there any way to alter the CUTSTONE hatch so that it isnt so big and when its scale is 1?

0.01 is the smallest number AutoCAD will let me enter, and unfortunately it is still too big for the sandstone wall I need :(

 

2.

What should I do to try and get all my other hatches working like the CUTSTONE hatch?

Posted

I am not sure what is happening to your hatch. It sounds as if AutoCAD is scaling the pattern of its own whim :shock:

 

Here is a picture of the Cutstone hatch with the scale set to 1, and showing the 1 by 1 square which is repeated.

CutstoneHatch.JPG

Posted

BB: I'm not in a position to answer your second question yet. As to the first, HatchKit can scale a pattern up or down but I'm not sure that is the answer. As eldon has just shown, the pattern repeats wthin a unit square so if you are drawing using mm as the drawing unit, all that detail will be crushed into a square mm -but if you use CUTSTONE1000 instead it will repeat every square metre, which would be in the region of the right scale for ashlar. If the basic unit is a metre, then the original CUTSTONE repeats every square metre and CUTSTONE1000 every square kilometre which could only be handy on a map - yet you want to shrink the hatch and other hatches are also misbehaving.

 

Looking at your screenshot, the drawing is dimensioned im mm, the insertion coordinates are way out to billy-o in the low millions yet a hatch only behaves if it's scaled right down to an insertion scale 0.01. Strange.

 

What are the current settings of HPORIGIN, HPORIGINMODE, HPSCALE, DIMLUNIT, LUNITS, UNITMODE, MEASUREINIT and MEASUREMENT or any other sysvar that could be in play here?

 

Is the drawing's raw unit of measurement meters, millimetres - or something else?

 

Might be time to upload the drawing for a real expert to inspect. :? As I said, I'm not used to C3D.

Posted

Thanks Eldon for posting what the hatch actually looks like.....now just hopefully I will get to see that image soon, haha

 

Hugh:

My drawing is in meters, I just changed the properties of the annotations for my section so they would be millimeters so I could keep everything in the same drawing.

I think posting my drawing on here as you said would be a very good idea, as I am completely stumped as to what is going on here :S (I will try and attach it at the end of this post)

 

Since the CUTSTONE1000 hatch worked (it was just way too big) I tried repeating the steps I used for linking it but using the original CUTSTONE hatch instead. However again it showed up with a red line through it.....when I tried to click on it, this time it said "Cannot set HPNAME to that value" :S

Hatch not working.dwg

Posted

I thought maybe the location where I am loading my files from may have something to do with why it is not working, altho this seemed weird because the CUTSTONE1000 hatch did work (even tho it was massive) and it was saved from the same location.....but I thought it was worth a try.

 

I tried to save the .pat files in "C:\\Users\\Workstation.Win7_img\\appdata\\roaming\\autodesk\\c3d

2011\\enu\\support\\acad.pat"

instead of making my own folder on my desktop for it......however I found when I got to Workstation.Win7_img, I could not go any further because the folder was locked (by my work).

 

I took the .pat files to another department thinking maybe it was my computer or to see if they had administration privileges and could access the path above. They were able to successfully copy and paste the files into the above path and load them in AutoCAD (they were very happy for all the free hatches I had just given them :) )

 

This confirms that there is nothing wrong with the .pat files (which is a relief)

and that the problem either lies with:

1. being unable to access the path above where they pasted their files

2. my AutoCAD drawing file

 

 

Its the weekend now, so i'm heading home from work. But on Monday hopefully the IT department will grant me access to that directory so I can try and paste my files in there and see if that was the problem.

 

 

Will keep you guys updated :)

Have a good weekend everyone :)

Posted

BB:

You can see your GRAVEL and AR-CONC hatches breaking up - as they do when drawn at high co-ordinates with a hatch orgin of zero.

This is readily fixed by repecifying a hatch origin nearby.

 

I had no problem hatching an area next to your detail with CUTSTONE at 1:1 scale.

Posted

Thanks Hugh for that tip about my other hatches....I thought they looked a bit funny.

I found another thread that said type "SNAPBASE" and pick a point near my drawing. However I did this and drew a new object to hatch and it still didnt change :S weird :S might read a few more threads to see if someone else has already posted how to solve it :)

 

Still waiting for IT to get back to me about loading the hatches, hopefully will happen later today *fingers crossed*

Posted

found the "set origin" button on the hatch ribbon and clicked that, concrete and gravel hatches are all good now, yay :)

Posted

So finally got into work today and IT have made a shortcut to the location of the acad.pat file on my desktop.

I copied and pasted all the .pat files into this folder, and then opened up a new AutoCAD file. All the hatches were there and were working. I then tried opening my file that I posted here to you guys and that worked as well.

 

So it turns out that the problem was the location of the .pat files and obviously not being properly linked in.

 

Thanks everyone for all your help with this, couldnt have done it without u :)

And hopefully this thread helps out others who are experiencing similar issues.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...