Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AutoCAD 2015 qsave will not work within lisp files.

11 REPLIES 11
SOLVED
Reply
Message 1 of 12
gpettit
1439 Views, 11 Replies

AutoCAD 2015 qsave will not work within lisp files.

I have 2015 installed on Windows 7 Pro.  

 

If I type qsave from the command line It behaves normally and saves the drawing.  However, if I put it in a lisp file (command "qsave") it returns nil and does not save the file.  It worked perfectly in 2014.  Any suggestions?

11 REPLIES 11
Message 2 of 12
hgasty1001
in reply to: gpettit

Hi,

 

It's working here Windows 8.1 64 bits. 2 Ideas: is the dwg file in the root? if so, try moving the file to a folder; the qsave command was undefined, type redefine in the command prompt, type _qsave and see what happen.

 

Gaston Nunez

Message 3 of 12
gpettit
in reply to: hgasty1001

Drawing file is not in the root directory.  Redefining it does not change it at all.  This is the weirdest thing I've seen in a while.

Message 4 of 12
hgasty1001
in reply to: gpettit

Hi,

 

Is it a network drive? if so, may be some problem with permissions, read only or locked file is other possible  cause of that behavior, check if there is a .dwl file with the same name in the dwg's folder.

 

Gaston Nunez

Message 5 of 12
gpettit
in reply to: hgasty1001

It is a network drive, but I don't find any problem with permissions.  If the permissions were not set properly or the file was locked, none of the qsave commands would work.  It works fine if I type it from the command line, it is only in the lisp commands that it fails.

Message 6 of 12
pendean
in reply to: gpettit

Are you sure it's not saving? Yes it returns nil here but on a third line after QSAVE is called and the time stamp for the file in Windows Explorer changed too.
Message 7 of 12
gpettit
in reply to: pendean

Positive.  I pulled up the folder and refreshed after each attempt.  The date and time of the file never change unless I type it from the command line.

Message 8 of 12
pendean
in reply to: gpettit

Win7 64bit here, AutoCAD 2015 OOTB, Win2008 Server where the file is, I used your code (command "qsave").
Weird.

ScreenShot001.png

Message 9 of 12
Balaji_Ram
in reply to: pendean

Hi,

 

Sorry for the delay.

 

Can you please try using (command-s) ?

 

http://docs.autodesk.com/ACDMAC/2014/ENU/index.html?url=files/GUID-5C9DC003-3DD2-4770-95E7-7E19A4EE1...

 

Regards,

Balaji

 



Balaji
Developer Technical Services
Autodesk Developer Network

Message 10 of 12
gpettit
in reply to: Balaji_Ram

Command-s worked perfectly!  Thanks so much for that.  Is there any specific reason the standard command function would not work?  It had worked in every previous version I had tried it in since AutoCAD Release 14.

Message 11 of 12
Balaji_Ram
in reply to: gpettit

The change is due to fiber removal in AutoCAD 2015 which requires ObjectARX, AutoCAD.Net and Lisp code to make some changes.

 

You can read about this here :

 

http://through-the-interface.typepad.com/through_the_interface/2014/03/autocad-2015-calling-commands...

 

http://www.youtube.com/watch?v=mEfdozjN62Y

 

Change to Lisp code is very minimal compared to ObjectARX and AutoCAD.Net API code that sends commands to AutoCAD.

 

As mentioned in the blog post, the distinction on when to use (command-s) over (command) in Lisp code is not clearly documented.

I would expect (command-s) to work in all cases, while (command) work only with a few commands.  So you may use command-s in all your code or only change those where (command) isnt working. But finding ones where (command) does not work is the hard part. Sorry about that.

 

Regards,

Balaji

 



Balaji
Developer Technical Services
Autodesk Developer Network

Message 12 of 12
gpettit
in reply to: Balaji_Ram

Thanks for that.  Based on the documentation for command-s, I should still use command when I need to pause it for user input.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost