I have a model file with a hatch I never have seen before.
Selecting the hatch I can see the name in Properties.
But when I try to adjust the boundary area or reuse it the hatch turns to a random type.
Is that a way to retrieve the hatch pattern as custom hatch?
Obtaining the original pattern (.pat) file from the drawing creator and having AutoCAD load it is the only method I know of.
It sounds like the custom hatch shows up initially in the drawing until you try to edit it. In that case, you could try exploding the hatch and copying the hatch objects to fill your new area. Not an ideal solution, though, and only really works if you have a simple area to fill.
Thanks! But I get error:
"VIAGW.pat already exists; Overwrite/Append? Append
; error: bad argument value: positive 0"
This custom hatch is "VIAGW.pat" and supposed to be included inte the model file but I can not figure it out!
Please see the attachments.
@Kent1Cooper wrote:
A web search for things like "extract hatch pattern from drawing" reveals a lot of potential solutions, just one example being >this<. [I have not tried it.]
I have now tried it, and it produced the attached file, which works for me. [But I was also able to edit the boundary of the pattern in your sample drawing, so maybe there's some other problem at your end.]
[It wouldn't let me attach a .pat file, so I put it into a .zip file.]
Unfortunate that GETPAT threw that error - I would delete VIAGW.PAT and try again rather than attempting to debug it.
So instead here is what I pulled from a DXF version of your DWG with HatchKit:
;-------------------------------------------------------------------------------
; Written by HatchKit 4 Professional Edition
; HatchKit 4 Professional Edition (c)1990-2020 Cadro Pty Ltd
; www.hatchkit.com.au/
;-------------------------------------------------------------------------------
;-Date : 2020/08/27
;-Time : 23:17:47
;-HatchKit 4 Version : 4.0.9.2894
;-HatchKit 4 Output Filetype : AutoCAD
;-------------------------------------------------------------------------------
*VIAGW,PATTERN
0,.40981,-.40981,0,.64641016,.3,-.81961524
30,.70981,-.40981,.32320508,.55980762,.3,-.99282032
60,.96962,-.25981,.55980762,.32320508,.3,-1.93923049
120,.15,-.25981,-.55980762,.32320508,.3,-1.93923049
150,.40981,-.40981,.96961524,.55980762,.3,-.99282032
hth,
Hugh Adamson
@hugha wrote:
....
*VIAGW,PATTERN
0,.40981,-.40981,0,.64641016,.3,-.81961524
30,.70981,-.40981,.32320508,.55980762,.3,-.99282032
60,.96962,-.25981,.55980762,.32320508,.3,-1.93923049
120,.15,-.25981,-.55980762,.32320508,.3,-1.93923049
150,.40981,-.40981,.96961524,.55980762,.3,-.99282032....
By comparison, here's the simpler version that PatOut.vlx returned:
*VIAGW
0, 0, 0, 0, 2.15470054, 1, -2.73205081
300, -1.3660254, 1.36602541, 1.8660254, -1.07735027, 1, -6.46410162
330, -0.8660254, 0.5, 1.07735027, -1.8660254, 1, -3.30940108
30, 1, 0, 1.07735027, 1.8660254, 1, -3.30940108
60, 1.8660254, 0.5, 1.8660254, 1.07735027, 1, -6.46410162
It would appear that PatOut.vlx actually derives the "native" definition, whereas what HatchKit produces is based on the drawn pattern in the sample drawing, which is not at a scale factor of 1, nor is its origin at 0,0 [note the numbers that are not 0 in the Hatchkit result's first line, that are 0 in PatOut's result, and the other "cleaner" 0.5's in PatOut's result].
Any "simplicity" obtained in extracting a pattern with an origin at one end of its only horizontal element comes at the cost of natural internal symmetry but as hatch scale or its origin can be readily adjusted - with AutoCAD for each fill instance and with HatchKit within the fill pattern definition itself a user can easily decide what best suits.
Here's that pattern again, rescaled and with origin to match where PatOut supplied:
;-------------------------------------------------------------------------------
; Written by HatchKit 4 Professional Edition
; HatchKit 4 Professional Edition (c)1990-2020 Cadro Pty Ltd
; www.hatchkit.com.au/
;-------------------------------------------------------------------------------
;-Date : 2020/08/28
;-Time : 12:03:04
;-HatchKit 4 Version : 4.0.9.2894
;-HatchKit 4 Output Filetype : AutoCAD
;-------------------------------------------------------------------------------
*VIAGW,PATTERN
0,0,0,0,2.154700538,1,-2.732050806
30,1,0,1.077350269,1.866025404,1,-3.309401077
60,1.866,.5,1.86602540,1.077350269,1,-6.464101615
120,-.86603,.5,-1.866025404,1.077350269,1,-6.464101615
150,0,0,3.232050808,1.866025404,1,-3.309401077
hth,
Hugh Adamson
Can't find what you're looking for? Ask the community or share your knowledge.