Jump to content

Lisp for opening a file in a specified folder


Recommended Posts

Posted

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

 

 

Posted (edited)
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
Posted (edited)

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
Posted

yes, i also tested this but still can not.

This time mine is 2 and i still can not open

EHParqo.png

Posted

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

Posted

I wish I could stay at your computer. Please put back that "Y" in the "command" function. It should work.

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