TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: cparnell on April 12, 2006, 11:28:47 AM

Title: AutoCAD to Explorer
Post by: cparnell on April 12, 2006, 11:28:47 AM
Since I know very little about LISP, I was reading in my A2K6 help file for the load function. I found a LISP routine for going straight from AutoCAD to the same location in Explorer. All of the routines that I have found in the past to do just this, appeared to have problems if the file path included comma's. This one so far has worked with comma's. Just thought I would pass it along.

This is what I found in the help file, (A2K6) under "load AutoLISP function":

(defun c:custfiles ()
  (command "shell"
    (strcat "explorer \"" (getvar "roamablerootprefix") "\"")
  )
  (princ)
)

I changed mine to:

(defun c:EP ()
  (command "shell"
    (strcat "explorer \"" (getvar "DWGPREFIX") "\"")
  )
  (princ)
)

Hope this helps some one.
Title: Re: AutoCAD to Explorer
Post by: M-dub on April 12, 2006, 11:40:02 AM
You may also want to have a look at this thread...
http://www.theswamp.org/index.php?topic=3331
Title: Re: AutoCAD to Explorer
Post by: RbtDanforth on April 12, 2006, 11:49:16 AM
You might want to look at the top of your acad.PGP file. Originally that was how you did dos commands out of Autocad, the name substitution stuff was stuck in on a afterthought.