Open path lisp

Open path lisp

andreas7ZYXQ
Advocate Advocate
1,388 Views
3 Replies
Message 1 of 4

Open path lisp

andreas7ZYXQ
Advocate
Advocate

Im looking for a lisp that will open a specified path.
I want to use the open command or similar build in autocad not startapp explorer..

defun c:run

and it will open and take me to a directory that looks like C:\xx\xx\xx\xx\xx\xx\xx\xx\xx\

at the moment i spen too much time going through my folders.
Anyone with great ideas?

0 Likes
Accepted solutions (2)
1,389 Views
3 Replies
Replies (3)
Message 2 of 4

Shneuph
Collaborator
Collaborator
Accepted solution

How many paths do you need to save?  Can you not use the places shortcuts on the left side of the open dialog?

 

Places.png

---sig---------------------------------------
'(83 104 110 101 117 112 104 64 71 109 97 105 108 46 99 111 109)
0 Likes
Message 3 of 4

andreas7ZYXQ
Advocate
Advocate

Of course!

Why make it more advanced than it has to be. Maybe my head just got stuck thinking about lisp 😛 

0 Likes
Message 4 of 4

Kent1Cooper
Consultant
Consultant
Accepted solution

If you do decide that it would be convenient to have something like a little command name or a menu pick that will take you directly, in one step, into a particular folder, here's a way to do that [adjust the command name and file path to suit]:

;;;  ODXYZ.lsp
;;;  to Open a Drawing in the C:\X\Y\Z Folder
(defun C:ODXYZ ()
  (vla-activate
    (vla-open
      (vla-get-documents
        (vlax-get-acad-object)
      )
      (getfiled "Select drawing:" "C:\\X\\Y\\Z\\" "dwg" 0)
    )
  )
)
(prompt "\nType ODXYZ to open a Drawing in the C:\X\Y\Z Folder.")
Kent Cooper, AIA
0 Likes