Creating Custom Hatch Patterns off Default CAD Patterns

Creating Custom Hatch Patterns off Default CAD Patterns

kmingH39H6
Contributor Contributor
575 Views
10 Replies
Message 1 of 11

Creating Custom Hatch Patterns off Default CAD Patterns

kmingH39H6
Contributor
Contributor

I am trying to create custom hatch patterns since we currently use the default ones and have to scale. I know I could put these in the Tool Palettes and set them up that way but I figured since I was able to edit the linetype and stumble through that, I could probably edit it so they are scaled at 1 with their names but I'm having no luck with changing the .Pat file. I was able to create their own patterns but I was having a tough time scaling them and also wanted to know if there is a way to have them show up first. Honestly we don't need the default ones if those 3 are set up but I wouldn't want to get rid of them completely if that's unnecessary.

0 Likes
Accepted solutions (2)
576 Views
10 Replies
Replies (10)
Message 2 of 11

pendean
Community Legend
Community Legend

Q: in your example, you have a solid hatch. how does that need to be 'scaled 1:1'?

 

Are you just looking to start a library of to-scale hatches? Like

 

https://www.archblocks.com/archblocks-cad-blocks-and-products-previews/autocad-hatch-patterns

 

https://www.autocaddetails.net/hatchpatterns.htm 

 

https://simplecad.com/product/autocad-hatch-patterns/

 

 

 

0 Likes
Message 3 of 11

kmingH39H6
Contributor
Contributor

Well, since it doesn't have a scale it wouldn't need to be scaled, just need that one to be renamed to WALL. When I attempted to copy and then rename the SOLID FILL it replaced it with the ANSI31 pattern even though I left it and added an entirely new one based on it. Then when I just tried to rename it straight up it did the same thing.

 

Just looking for those 3 to show up exactly the way I have them there without requiring you to scale. Those are the only 3 hatch patterns our Company uses consistently so I might just get rid of most of the other patterns once I figure it out. We also use ANSI31 and Dots but those are scaled differently depending on the drawing.

 

And like I said, I know I can set these up in Tool Properties and currently have them setup but it'd be so much easier if there was just the top 4 hatches we use in the ribbon when we run BH

0 Likes
Message 4 of 11

scot-65
Advisor
Advisor

@kmingH39H6 

acad.pat / acadlt.pat are the only files that will let you "add to the list" of patterns.

You can place your definitions at the beginning of the file.

 

For patterns that are not included in the acad.pat file, they have to be stand-alone files

where the pattern name is exactly the same as the file name and there are no other

definitions inside the file. These will be found in the "Custom" line of the hatch dialog.

Be sure to include a support path to the directory these files are located in.

 

scot65_0-1742329522181.png

 

Hope this helps.

 


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes
Message 5 of 11

paullimapa
Mentor
Mentor

FYI for SOLID fill hatch this name is something built-in to AutoCAD so it would recognize it uniquely so you cannot change the name.

Note what is stated inside the acad.pat file:

paullimapa_0-1742330226018.png

Also mentioned here by @Kent1Cooper 

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/creating-a-custom-hatch-with-pattern...

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 6 of 11

kmingH39H6
Contributor
Contributor

Ok I will just simply put the Patterns for the 3 that I need edited since they are not scaled how I want and that's where I need the help. And the Wall does not come up as solid even though I copied the Solid Hatch logic. I'm not sure what exactly is going on here, not as straightforward as the Linetype file. If someone could edit the Pavers so they are .3 the scale and the Tactical Domes so they are 2.5 the scale that's all I need. 

 

*WALL, Custom solid fill for walls
45, 0,0, 0,.125
*TACTICAL_DOMES, Custom hex pattern for Tactical Domes
0, 0,0, 0,0.21650635094610966169093079268823, .125,-.25
120, 0,0, 0,0.21650635094610966169093079268823, .125,-.25
60, .125,0, 0,0.21650635094610966169093079268823, .125,-.25
*PAVERS, Custom brick pattern for pavers
0, 0,0, 0,2.667
90, 0,0, 2.667,4, 2.667,-2.667

 

 

I also just tested to see what would happen if I took out the default patterns from the 2 files and just leave the custom ones but I still get 9 patterns that start with GR_ and I'm not seeing those anywhere.

0 Likes
Message 7 of 11

kmingH39H6
Contributor
Contributor

Thank you, seems dumb to not be able to rename that or use the pattern again but I guess I will just focus on scaling the other patterns.

0 Likes
Message 8 of 11

Kent1Cooper
Consultant
Consultant

@kmingH39H6 wrote:

....

0, 0,0, 0,0.21650635094610966169093079268823, .125,-.25
120, 0,0, 0,0.21650635094610966169093079268823, .125,-.25
60, .125,0, 0,0.21650635094610966169093079268823, .125,-.25
....


Just a little reality check:  AutoCAD can only keep track of 16 significant figures, so your super-long decimal portions are wasted.  But even if you limited them to 16, I would still wonder -- what need could there really be for any more than, say, 4 or 5 decimal places?

Kent Cooper, AIA
0 Likes
Message 9 of 11

Sea-Haven
Mentor
Mentor
Accepted solution

Try saving pattern as temp file pat.csv then open in excel, this allows you to multiply all the numbers by a factor. then save again and copy and paste into a Pat file. Ok there are two pattern types an imperial and a metric the values are different, but easy to work out 0.125 is 1/8" 0.5 1/2" etc metric you may have like 2.5 0.5 etc. Look above Kent's is imperial.

0 Likes
Message 10 of 11

Kent1Cooper
Consultant
Consultant
Accepted solution

@Sea-Haven wrote:

.... multiply all the numbers by a factor.....


[Not all of them.  The angle numbers at the beginning of each line would remain as they are.]

Kent Cooper, AIA
0 Likes
Message 11 of 11

Sea-Haven
Mentor
Mentor

Thanks for that oversight Kent,  lucky in excel the angle will be in a column. So dont change. Yes have made custom patterns and linetypes playing with the numbers.

0 Likes