thanks dvarino
i think the problem is now with this cond statement:
(cond
((= superf "Yes") (prompt "\n Running SUPERFLATTEN, back-up of drawing will be saved with PREFLAT prefix) (SAVE_PREFLAT))
( (or (= superf "No") (= superf "") (prompt "\n OK, moving on and leaving drawing as is in 3D...")))
) ; end cond
but I'm damned if I can figure it out..
save_preflat being this:
;SAVE_PREFLAT = save copy of drawing as preflat-state
(defun SAVE_PREFLAT ()
(vl-load-com)
(setq AcadObj (vla-get-ActiveDocument (vlax-get-acad-object)))
(setq File_PreName "PREFLAT-")
(setq FileName (getvar "DWGNAME"))
(setq PreFileName (getfiled "Input name of PREFLATTENING drawing to save" (strcat File_PreName FileName) "dwg" 1))
(if (findfile PrefileName)
(command "_SAVE" PreFileName "Y")
(command "_SAVE" PreFileName)
)
(princ (strcat "\n" File_PreName "File saved as '" (vl-filename-base PreFileName) "'.\n"))
(c:superflatten)
(princ)
)