TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: nobody on June 12, 2016, 01:55:10 PM
-
Anyone know how to pass the filename to the command line from a script file for "-exporttoautocad"? I don't want to overwrite the original.
Thanks!
-
Do you mean this?:
(strcat (getvar 'dwgprefix) (getvar 'dwgname) "MySuffix")
-
Thanks Roy. That works for autolisp but what I need is something that will work with a "script" file
-
You should also be able to use Lisp code in a .scr file. But, depending on the context, you may have to change the TEXTEVAL variable. Using a (command "_.-exporttoautocad ...) structure inside the script may also work.
-
Thanks Roy, what I ended up doing is add a suffix through -exporttoautocad command line settings...worked well enough.
-
I would incorporate a basic lisp routine to check if your output file exists. If memory serves me right, if it exists the default prompts will not overwrite the .dwg with the new export as it will prefix the output with "ACAD-".
Perhaps, something like this before your export line.
) ; setq
(princ) ; do nothing if not found ) ; end if