Help with custom .PAT file

Help with custom .PAT file

Travis.Biddle
Advocate Advocate
582 Views
11 Replies
Message 1 of 12

Help with custom .PAT file

Travis.Biddle
Advocate
Advocate

Can anyone help me with creating a custom .PAT file?  An example of what I am trying to do is in the attached drawing.  I have done some very simple ones in the past, but this one has me stumped.

0 Likes
Accepted solutions (1)
583 Views
11 Replies
Replies (11)
Message 2 of 12

pendean
Community Legend
Community Legend

Elaborate a bit more on it please: for example, are you needing this exact perfection in layout/display, and is that rectangle the only size? 

And any reason why a BLOCK of all of that would not do well for you instead?

pendean_1-1668612738837.png

 

0 Likes
Message 3 of 12

Travis.Biddle
Advocate
Advocate

The rectangle is the default size of the object I will be hatching and shows the desired spacing between the text of the hatch.  The size may increase (never decrease) but the ratio between height and width always remains the same. Height of the rectangle will always be 2x of the width. I have other instances where a block of the pattern works, but will not for this case so I need hatching.

0 Likes
Message 4 of 12

Kent1Cooper
Consultant
Consultant

A Hatch pattern needs to be inherently repetitive.  If it's even possible [however extraordinarily complicated] to define a pattern involving all the bits making up the letters in those words, then if there's a "word" a certain distance up and to the right of, say, the one at lower left in your example, then there would be another one up and to the right of that by the same distance, etc.  Applying it in a boundary like yours would surely result in something like this:

Kent1Cooper_0-1668617681021.png

So I don't think a Hatch pattern is what you want.

 

Is the idea that no matter the size of the boundary, the text pieces would be of the same size and spacing and displacement angle?  If the proportions of the boundary are always the same, and if the text size can change to go along with the boundary size, then a Block would work, but I assume that's not your situation.  Show some examples of what you're looking for at different boundary sizes.  If it's twice as big, do you still want 5 words?  Arranged similarly in relation to the boundary (e.g. same distances inboard, but spread out more -- another impossibility with a Hatch pattern)?  Etc.

Kent Cooper, AIA
0 Likes
Message 5 of 12

Travis.Biddle
Advocate
Advocate

I understand that it needs to be inherently repetitive so the example you show was expected and totally acceptable.  

0 Likes
Message 6 of 12

Travis.Biddle
Advocate
Advocate

I was able to find a hatch generating lisp that was able to get it done.   Took me a little bit to get the desired result, but it worked.

0 Likes
Message 7 of 12

Kent1Cooper
Consultant
Consultant

Can you use SUPERHATCH?  These were done with it:

Kent1Cooper_0-1668619748153.png

using a Block that looks like this:

Kent1Cooper_1-1668619886097.png

without the dashed grey outline -- that's a 40-unit square used for spacing.  I used TXTEXP to get the incomplete words Trimmable to meet the square's edges.

 

But that depends, again, on whether you want the words the same size and spacing no matter what the boundary size.

Kent Cooper, AIA
0 Likes
Message 8 of 12

hugha
Collaborator
Collaborator
Accepted solution

Late to the party but HatchKit can create hatchpatterns containing text directly from default Roman Simplex or other resident SHX fonts within an existing pattern or by this Quickfill wizard:

 

          hugha_0-1668651125765.png

 

Text string size, spacing and orientation can be adjusted.

 

Resulting pattern attached.

 

Hugh Adamson

www.hatchkit.com.au

 

 

0 Likes
Message 9 of 12

Travis.Biddle
Advocate
Advocate
When trying to use the hatch you attached, I get "Error in Pattern File"
0 Likes
Message 10 of 12

Kent1Cooper
Consultant
Consultant

@Travis.Biddle wrote:
When trying to use the hatch ... I get "Error in Pattern File"

It works for me.  If you happened to not use the posted file itself, but copied the definition code out and pasted it into another file, and omitted the blank line that's required at the end of the file, that would make it unusable.

Kent Cooper, AIA
Message 11 of 12

Travis.Biddle
Advocate
Advocate

I figured it out.  I changed the file name, but not the top line of the code.  I didnt know those needed to match. 

Message 12 of 12

hugha
Collaborator
Collaborator

Hi Travis, Hi Kent,

 

thanks to you both for sorting that out. My immediate attempt at a reply was forestalled by this board's login gremlin earlier today. Just as well, as the reply would not have helped address the issue at all.

 

Please excuse this vent. AutoCAD patterns are super fragile when accessed from AutoCAD. Other systems that use exactly the same PAT text files are far more relaxed regarding internal format, file naming or even the number of patterns contained. The worst aspect in my estimation is the catch-all error message ACAD will issue giving no clue as to why it finds a particular pattern unacceptable so assistance then becomes a guessing game.

 

 

Hugh Adamson

www.hatchkit.com.au