Lisp advice requested

Status
Not open for further replies.

Paul Turvill

Usenet Archive
Joined
Jan 4, 2000
Messages
2,691
Reaction score
0
Check out the (findfile) function. It will find the file if it's *anywhere* in your search path.
___

wrote:

Even though they are in a defined search path the routine will not work unless the path is specified.
 
If you're using Acad2000 or later, you can read the path to the plot styles from the registry.

For example:

; GET THE NAME OF THE DEFAULT PROFILE
(setq profile (vl-registry-read
"HKEY_CURRENT_USER\\Software\\Autodesk\\AutoCAD\\R15.0\\ACAD-8:409\\Profiles "))

; LOOK UP THE PLOT STYLE TABLE LOCATION FOR THE DEFAULT PROFILE (vl-registry-read (strcat "HKEY_CURRENT_USER\\Software\\Autodesk\\AutoCAD\\R15.0\\ACAD-8:409\\Profiles \\" profile "\\General" "PrinterStyleSheetDir"))

You'll have to modify the key hard-coded above to match your installation. Use regedit.exe to locate the correct registry key on your computer.

- Aaron

wrote:

Could someone please advise me of a way to better define the path to the *.tbl files, so that the tables can be read.

Even though they are in a defined search path the routine will not work unless the path is specified.

I was hoping that if I need to move the files to another search path, I will not need to redefine the path in all my routines which are using tables.

; routine to draw items
...

-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
 
..And you can also use: (faster and safer)
(vl-load-com)
(setq myPrefs (vla-get-preferences (acad-object)))
(setq FilesTab (vla-get-files myPrefs))
;;; now you can...:
(vla-get-PrinterStyleSheetPath FilesTab)

See that there is also a (vla-put-PrinterStyleSheetPath FilesTab <your path here>) method.

Justo.

----- Original Message -----
Sent: Thursday, January 24, 2002 1:04 PM
Subject: [News] Re: Lisp advice requested

If you're using Acad2000 or later, you can read the path to the plot
styles
from the registry.

For example:

; GET THE NAME OF THE DEFAULT PROFILE
(setq profile (vl-registry-read
"HKEY_CURRENT_USER\\Software\\Autodesk\\AutoCAD\\R15.0\\ACAD-8:409\\Profiles
"))

; LOOK UP THE PLOT STYLE TABLE LOCATION FOR THE DEFAULT PROFILE (vl-registry-read (strcat
"HKEY_CURRENT_USER\\Software\\Autodesk\\AutoCAD\\R15.0\\ACAD-8:409\\Profiles
\\" profile "\\General" "PrinterStyleSheetDir"))

You'll have to modify the key hard-coded above to match your installation. Use regedit.exe to locate the correct registry key on your computer.

- Aaron

wrote:

> Could someone please advise me of a way to better define the path to ...
 
Status
Not open for further replies.

Latest threads

Back
Top