
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I would describe my LISP skills as very rudimentary if that at all. I wrote this LISP trying to simplify the plotting procedure for something I do several times a day, but it doesn't seem to work. When I type everything in the command line, it works all the way up to the "savename" variable I created. Currently, when the LISP finishes running, it gives me a prompt for the file name and I thought the "savename" variable I created would automatically create this name. Anybody have any ideas as to how to fix this?
Directory the CAD file I would work from would be like this:
C:\Work\LISP_TEST\CAD\FAV
Directory the PDF would be automatically placed would be like this:
C:\Work\LISP_TEST\PDF\FAV
The PDF name should be identical to the DWG file name.
(defun c:CU ( / ppath newpath savename)
(vl-load-com)
(setvar "filedia" 0)
(setq ppath (getvar "dwgprefix"))
(setq newpath (vl-string-subst "\\PDF\\" "\\CAD\\" ppath))
(setq savename (strcat newpath (vl-filename-base (getvar "dwgname"))))
(command "-export"
"p"
"c"
"n"
savename
)
(setvar "filedia" 1)
(princ)
)
Solved! Go to Solution.