PDA

View Full Version : Use Saveas Command from a Lisp Routine


vferrara
2006-11-08, 03:28 PM
Hello AUGI Members:

Is there a way to envoke the SaveAs command from inside a lisp routine and still get the Save Drawing As dialog box to select the folder and drawing name of the new file. When I attempt to do this I only get the command line prompt and I would like to have the ability to interactively select the target folder and file name.

Thank you for any assistance in this matter.....!!!!

Regards,
Vince

madcadder
2006-11-08, 03:34 PM
(DEFUN c:sas ()
(COMMAND "_saveas" "" "~")
(PRINC "\nSaveAs Complete:")
(PRINC)
) ;_ end of DEFUN

vferrara
2006-11-08, 04:07 PM
Tod:

Thank you for your quick response.......your code seems to be working exactly the way I need it to accomplish my objective.

Thanks again for your help....!!!

Regards,
Vince

madcadder
2006-11-08, 05:02 PM
Nadda problem... Have a good one.

ElpanovEvgeniy
2006-11-08, 05:22 PM
(vla-SaveAs (vla-get-ActiveDocument(vlax-get-acad-object)) "d:\\test_1.dwg" ac2004_dwg)

last argument - format file:
acR14_dwg
ac2000_dwg
ac2000_dxf
ac2000_Template
ac2004_dwg
ac2004_dxf
ac2004_Template
ac2007_dwg
ac2007_dxf
ac2007_Template
acNative