WPerciful Posted February 6, 2015 Posted February 6, 2015 I'm not sure what happened but I can't seem to get this simple line of code to work. (command "_saveas" "2013" "D:\\Work\\Test.dwg") It just returns a nil. There is nothing wrong with the file path. If I enter the same data in at the command line it works fine. Quote
WPerciful Posted February 6, 2015 Author Posted February 6, 2015 For some reason it works on my work PC, but it fails on my laptop and my home PC. It would seem that there is there an intermittent problem. Quote
WPerciful Posted February 6, 2015 Author Posted February 6, 2015 (edited) Thanks to a post by: ElpanovEvgeniy found: http://forums.augi.com/showthread.php?50250-Use-Saveas-Command-from-a-Lisp-Routine This seems to be the answer: (vla-SaveAs (vla-get-ActiveDocument(vlax-get-acad-object)) filename ac2013_dwg) Edited February 6, 2015 by WPerciful code error Quote
rkmcswain Posted February 6, 2015 Posted February 6, 2015 (edited) It works fine here using 2015. The only case where I can get it to fail is when: * You do not have write permissions * The filename provided already exists. See also: http://www.cadtutor.net/forum/showthread.php?50468-Simple-saveas-LISP Edited February 6, 2015 by rkmcswain add link Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.