Jump to content

Lisp for opening a file in a specified folder


vudungcom

Recommended Posts

I think I got it!

In the image you posted I can see that your AutoCAD expects a drawing name but the Lisp sends him a "y". I am at home now, but please locate this line:

(command "fileopen" "y" (nth ToOpen DWGlist))

and delete the "y", so that line becomes:

(command "fileopen" (nth ToOpen DWGlist))

My AutoCAD asks the user for a confirmation, that's why I wrote that "y".

 

 

Link to comment
Share on other sites

6 hours ago, fuccaro said:

I think I got it!

In the image you posted I can see that your AutoCAD expects a drawing name but the Lisp sends him a "y". I am at home now, but please locate this line:


(command "fileopen" "y" (nth ToOpen DWGlist))

and delete the "y", so that line becomes:


(command "fileopen" (nth ToOpen DWGlist))

My AutoCAD asks the user for a confirmation, that's why I wrote that "y".

 

 

I dont know why it asked me about enter number of file to open, i enter "1" then it did not open. Here is my log

h2dykzO.png

Edited by vudungcom
Link to comment
Share on other sites

The open "Y" is linked to SDI mode if you have only 1 dwg open it will work tested 2018 2019 did not work when I had 3 dwgs open.

 

If you only want 1 path just change the code so path is till defined remove in my version the listbox code.

Edited by BIGAL
Link to comment
Share on other sites

Now this one is confusing; sometimes you need that "y" in the command line and sometime that causes the error.

Please enter SDI at the command prompt and tell me returned value

Link to comment
Share on other sites

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