Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to export Hatch pattern?

13 REPLIES 13
Reply
Message 1 of 14
Anonymous
21560 Views, 13 Replies

How to export Hatch pattern?

 
13 REPLIES 13
Message 2 of 14
Anonymous
in reply to: Anonymous

David,

Hatch pattern definitions are not stored within a drawing like linetypes
and therefore can not be "exported." Hatch pattern definitions are stored
in PAT files. Get your consultants to send the hatch pattern files with the drawng files.

Doug

"David Lewis" wrote in message
news:so2krt8jifi99j9p9umibk70pgi84i46nt@4ax.com...
>
Message 3 of 14
Anonymous
in reply to: Anonymous

Not true. Later versions of AutoCAD (R14 & later) *do* contain hatch pattern
definitions. They may be recovered and saved to .pat files with GETPAT.LSP
from
http://www.turvill.com/t2/free_stuff/index.htm
___

"Doug Broad" wrote in message
news:19248350F8EBEF4928136055F4A7B92C@in.WebX.maYIadrTaRb...
>
> Hatch pattern definitions are not stored within a drawing like linetypes
Message 4 of 14
Anonymous
in reply to: Anonymous

I stand corrected. Thanks Paul.

Doug
Message 5 of 14
Anonymous
in reply to: Anonymous

correct, thankx again Paul

"Paul Turvill"
|>Not true. Later versions of AutoCAD (R14 & later) *do* contain hatch pattern
|>definitions. They may be recovered and saved to .pat files with GETPAT.LSP
|>from
|>http://www.turvill.com/t2/free_stuff/index.htm
|>___
|>
|>"Doug Broad" wrote in message
|>news:19248350F8EBEF4928136055F4A7B92C@in.WebX.maYIadrTaRb...
|>>
|>> Hatch pattern definitions are not stored within a drawing like linetypes
|>
|>
Message 6 of 14
Anonymous
in reply to: Anonymous

Paul,

I like the routine but it sometimes hangs with error: bad argument type: stringp nil
Do you have any idea what's happening?

Doug
Message 7 of 14
Anonymous
in reply to: Anonymous

Not a clue. Perhaps you could cut and past the Command: window dialog so I
can get an idea of where in the error is occurring? Also, which version of
AutoCAD are you using, and which version was the .dwg created with?
___

"Doug Broad" wrote in message
news:F831640A8A6A6AD8DAA8E71C5DA70417@in.WebX.maYIadrTaRb...
>
> I like the routine but it sometimes hangs with error: bad argument type:
stringp nil
> Do you have any idea what's happening?
Message 8 of 14
Anonymous
in reply to: Anonymous

Found the problem. The first assignment to flin occurs within an if statement. The
assignment only occurs if the PAT file already exists. Otherwise flin is left to nil
and causes strcat to choke. I moved the assignment to the same setq statement that
you use to open the file and it works fine. Be glad to send or post a copy. You
decide.

Doug
A2k and A2k2/AD3.3

"Paul Turvill" wrote in message
news:EE7C887BD37DF58FF855D3CB55A12570@in.WebX.maYIadrTaRb...
> Not a clue. Perhaps you could cut and past the Command: window dialog so I
> can get an idea of where in the error is occurring? Also, which version of
> AutoCAD are you using, and which version was the .dwg created with?
> ___
Message 9 of 14
crazygreek10
in reply to: Anonymous

I know it's been a while...but do you still have that get hatch fix for that lisp routine?

 

Thanks.

Message 10 of 14
hgasty1001
in reply to: crazygreek10

Hi,

 

You can downlod it from the developer site: http://www.turvill.com/t2/free_stuff/index.htm

 

Gaston Nunez

Message 11 of 14
cwinches
in reply to: hgasty1001

Uh, where does it save the pattern file? Not clearly stated in the code or in the command itself. Help!

Message 12 of 14
cadffm
in reply to: cwinches

This depends on how you started Acad.
Have you started Acad over a DWG (Explorer), then in this folder.

If Acad was started through a desktop shortcut,
Then it depends on what is written in "Run in" is written,
With the original link it would be in "C: \\ Users \\ << User >> \\ Documents \\".

(I have NOT programmed it, I just want to help)

If you do not find it: Open Acad over a DWG in the Explorer, then run the program, the file should then be in the current folder.

- Sebastian -
Message 13 of 14
cwinches
in reply to: cadffm

Thanks for the reply. Unfortunately that doesn't help very much since I'm accessing via a network license with no local data. I don't think this script is of any use to me then. Does anyone know of another working solution?

Message 14 of 14
cadffm
in reply to: cwinches

And what is the Problem with non-local Data?

 

Using getpat and type into CommandLine (findfile "<NameOfPattern>.PAT")

 

Or edit the Lispcode in Notepad 😉

 

 

 

old1:

(setq outf (strcat hnam ".pat"))

 

new1:

(setq outf (strcat (if (zerop(getvar "DWGTITLED")) "" (getvar "DWGPREFIX")) hnam ".pat"))

 

old2:

(alert (strcat hnam " pattern definition written to " hnam ".PAT"))

new2:

(alert (strcat hnam " pattern definition written to " (findfile (strcat hnam ".PAT"))))

 

In named Files, the PAT File should be saved in the DWG-Folder.

 

 

- Sebastian -

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost