0 Members and 1 Guest are viewing this topic.
(getvar "DWGTITLED")If it = 0, the drawing hasn't been saved yet.It if = 1, the drawing has already been saved.
Look at (setvar 'filedia 1)
So what exactly is happening when the user does a SAVEAS?
(defun c:TEST () (setvar 'filedia 1) (command ".SAVEAS") )
Try(defun c:TEST () (initdia) (command ".SAVEAS") )
No, I can haveCode: [Select](defun c:TEST () (setvar 'filedia 1) (command ".SAVEAS") )& I still get the command line version!
Quote from: A_LOTA_NOTA on August 17, 2007, 10:44:00 AMNo, I can haveCode: [Select](defun c:TEST () (setvar 'filedia 1) (command ".SAVEAS") )& I still get the command line version!Part of the problem is with the second line of code...(setvar 'filedia 1) should be (setvar "filedia" 1)Notice the quotes. . . . . . . . . . . . .^ ^ ^
Quote from: Matt W on August 17, 2007, 10:49:24 AMQuote from: A_LOTA_NOTA on August 17, 2007, 10:44:00 AMNo, I can haveCode: [Select](defun c:TEST () (setvar 'filedia 1) (command ".SAVEAS") )& I still get the command line version!Part of the problem is with the second line of code...(setvar 'filedia 1) should be (setvar "filedia" 1)Notice the quotes. . . . . . . . . . . . .^ ^ ^ Try it my way, I think you will get the same results!Willie fixed my problem.
Quote from: A_LOTA_NOTA on August 17, 2007, 10:58:51 AMQuote from: Matt W on August 17, 2007, 10:49:24 AMQuote from: A_LOTA_NOTA on August 17, 2007, 10:44:00 AMNo, I can haveCode: [Select](defun c:TEST () (setvar 'filedia 1) (command ".SAVEAS") )& I still get the command line version!Part of the problem is with the second line of code...(setvar 'filedia 1) should be (setvar "filedia" 1)Notice the quotes. . . . . . . . . . . . .^ ^ ^ Try it my way, I think you will get the same results!Willie fixed my problem.Huh... no $*#%. I never knew that nor have I ever seen it done that way (until today).Cool.