muck Posted November 2, 2010 Share Posted November 2, 2010 Release 2010 Is there a way to make AutoCAD have a command prompt when there are no drawings in the editor? Thank you, Quote Link to comment Share on other sites More sharing options...
JohnM Posted November 2, 2010 Share Posted November 2, 2010 no there is not. what would you want it for if there is nothing that would respond to it? Quote Link to comment Share on other sites More sharing options...
muck Posted November 2, 2010 Author Share Posted November 2, 2010 I am making a open command that controls autocads Default directory using VBA and Lisp. My program will use open common dialog box to open a drawing with the last default dir set by the previous saved drawing. No matter if Autocad is open by Ms Explorier or AutoCAD open command. I use lisp to open my VBA open program at the command prompt. Maybe I can change an AutoCAD menu macro to do the same thing? Thank you, Quote Link to comment Share on other sites More sharing options...
BlackBox Posted November 2, 2010 Share Posted November 2, 2010 I am making a open command that controls autocads Default directory using VBA and Lisp.My program will use open common dialog box to open a drawing with the last default dir set by the previous saved drawing. No matter if Autocad is open by Ms Explorier or AutoCAD open command. I use lisp to open my VBA open program at the command prompt. Maybe I can change an AutoCAD menu macro to do the same thing? On my system, the last directory used is the 'default' directory for the open dialog ... what am I missing? Quote Link to comment Share on other sites More sharing options...
JohnM Posted November 2, 2010 Share Posted November 2, 2010 mine also, when ever i use the open command it opens the last directory i was in that i opend a file in. are we not understanding what you want to accomplish? Quote Link to comment Share on other sites More sharing options...
BlackBox Posted November 3, 2010 Share Posted November 3, 2010 Perhaps something like this will be useful: (defun c:TEST (/ fileName) (vl-load-com) (cond (*acadApp*) ((setq *acadApp* (vlax-get-acad-object)))) (if (setq fileName (getfiled "Select File" "[color=red]YourFilePathGoesHere[/color]" "dwg" ) (vla-put-activedocument *acadApp* (vla-open (vla-get-documents *acadApp*) fileName :vlax-false))) (princ)) Note - Code will not function if SDI = 1. Hope this helps! Quote Link to comment Share on other sites More sharing options...
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.