GregGleason 发表于 2022-7-5 15:45:59

Export to AutoCAD - Layers Gon

I have an export routine that I would like to improve on.
 
It's "fine" but I would like it to do two things.
 
The first thing (and most important) is that the unused layers go away.I need that not to happen.
 
The second thing is that it would be nice if the file could overwrite itself, but I don't think that is possible.But I can do a work around for that.
 
Below is the code.
 
(defun c:E2A ( / filename)(setq filename (strcat (getvar "dwgprefix") "acad-" (getvar "dwgname"))); (setq filename (strcat (getvar "dwgprefix") "" (getvar "dwgname")))(if (findfile filename)   (progn      (Princ "\nOverwriting and exporting file to AutoCAD ...")      (command "_.-exporttoautocad" "_F" "2010" "" filename "_Y")   )   (progn      (Princ "\nExporting new file to AutoCAD ...")      (command "_.-exporttoautocad" "_F" "2010" "" filename)   ))(princ)) 
Greg
页: [1]
查看完整版本: Export to AutoCAD - Layers Gon