Hatch pattern list

Marco Jacinto

Usenet Archive
Joined
Dec 23, 2003
Messages
31
Reaction score
0
Hi everybody,

I'm trying to find a list of all the paterns in the system.

There is an easy way, or should I search throw the files to find the names?

Thanks.

Saludos

Marco Jacinto
 
ACAD.PAT?
Example *NAME

*SOLID, Solid fill
45, 0,0, 0,.125

There may be some vla function someones comeup with.
 
aqui tienes un ejemplo de como, espero te sirva:

;; archivos pat dentro del directorio de soporte de autocad 2004 (vl-directory-files (vl-filename-directory (findfile "acad.pat"))
"*.pat")

;;;("acad.pat"
;;; "acadiso.pat" "ashlar.pat" "hillstone.pat" ;;; "ledgestone.pat" "riverrock.pat" "rubble.pat")

;; leer el archivo "acad.pat"
(setq file_open (open (findfile "acad.pat") "r"))

;; lectura linea por linea, mientras no llegemos al final de archivo (while (setq line (read-line file_open)) ;; guardar lineas en un listado (setq tmp (cons line tmp)))

;; cerrar el archivo
(close file_open)

;; colocar la lista de principio a fin
(setq tmp (reverse tmp))

;; hacer un listado solo de donde encontremos el aterisco ;; estara siempre en el primer caracter (setq lst (vl-remove-if-not '(lambda (string) (if (eq (substr string 1 1) "*") string))
tmp))

;; hacer un listado de los nombres de los pat's
(setq
lst_2 (mapcar
'(lambda (string)
(substr string 2 (- (vl-string-search "," string) 1)))
lst))

saludos,
luis
 
Hi Marco,

Not sure if this is what you are after exactly but this will give you what is in the acad.pat file... at the command line try this.

Command: hatch

Enter a pattern name or [?/Solid/User defined] <ANSI31>: ?

Enter pattern(s) to list <*>:

SOLID - Solid fill
ANGLE - Angle steel
ANSI31 - ANSI Iron, Brick, Stone masonry
etc...

It is a start, gives you the name and the description, does not include any custom files though. Then you can highlight and copy from the text screen.
Hope this helps.

Arnold Williams
Architectural Designer/CAD Coordinator
SCM Consultants, Inc.
 
Thanks to everybody,

Actually I have a routine to get the names from the acad pat, and to list them to further work with it, something similar to that from Luis, but in plain Lisp, I just wanted to know if there where another method, thanks again.

Saludos

Marco Jacinto
 

Latest threads

Back
Top