Jump to content

AutoCAD Command Prompt when there is no drawings in Acad Editor.


Recommended Posts

Posted

Release 2010

Is there a way to make AutoCAD have a command prompt when there are no drawings in the

editor?

Thank you,

Posted

no there is not.

what would you want it for if there is nothing that would respond to it?

Posted

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,

Posted
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? :?

Posted

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?

Posted

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!

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...