Jump to content

Can anyone help me write and open.lsp?


Recommended Posts

Posted

I'm using AutoCad 2009 and I used to use before (command "open" "") to invoke the open command, but now its not working, I have seen many visual lisp routines that use open but are specific to a file name. I dont want to open a specific file I want to choose the file via the AutoCad open command dialogue box.

 

Can anyone help me with this?

Posted

I'm using AutoCad 2009 and I used to use before (command "open" "") to invoke the open command, but now its not working, I have seen many visual lisp routines that use open but are specific to a file name. I dont want to open a specific file I want to choose the file via the AutoCad open command dialogue box.

 

Can anyone help me with this?

Posted

The value for SDI = 0 I want to be able to open multiple drawings at one time.

Thanks

Posted

what about calling a dialog box first then pass the value to vla-open

 

(setq filename (getfiled "Select Filename to open:" "" "dwg" 8 )

 

 

BTW: does this have something to do with the other thread you started?

Posted

Hi pBe,

 

Thanks but I know nothing of via-open could you please show mw how the code might look like

 

Thanks

Posted
 
(defun c:test4u  ()
(setq filename (getfiled "Select file to open read-only" "" "dwg" 4))
          (vla-activate
            (vla-open (vla-get-documents (vlax-get-acad-object)) filename :vlax-false))))

Posted

The reason I want to define my own open is I want to include a subroutine from my other thread called (diary) that records all my time for each job (drawing) I work on each time I open a file.

 

I know the "Getfile" command is one way but is there any way of invoking the normal AutoCAD "OPEN" and just before I can slip in my (Diary) subroutine.

 

Thanks.

Posted

I would suggest the Moderators shoudl merge this thread with the second one you posted:

Then we'll pick up form there.

 

:)

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...