Fixed Saving-Path for Logfile from a LISP-Code

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
the situation is as follows:
I use a Lisp script in ACA which writes a log file at the end. Now It is programmed that the LOGFile will always be placed in the location of the DWG file, that I am applying the script to. Sometimes it doesn't work for some inexplicable reason, so I wanted to specify a fixed saving-location, e.g. "C: / Temp" What is the order for that?
Here is my previous code for flexible saving.
------------------------------------------------------
(Defun WriteLogT (textzeile / filename Logdatei)
(setq filename (if (> (vl-string-search "\\" (getvar "DWGNAME") 0) 0)
(getvar "DWGNAME")
(strcat (getvar "DWGPREFIX") (getvar "DWGNAME"))
)
)
(if (setq Logdatei (open (strcat filename "Logdatei.LOG") "a"))
(progn
(write-line (vl-string-subst "" "\n" Textzeile) Logdatei)
(close logdatei)
)
)
)
------------------------------------------------------
Perhaps you can use that to find a solution.
Thank you
Erik