Visual LISP, AutoLISP and General Customization

Reply
Active Contributor
ditran
Posts: 27
Registered: ‎01-28-2013
Message 1 of 6 (562 Views)

Find current lisp file path

562 Views, 5 Replies
09-05-2013 12:45 AM

Hi All,

 

Is there any way to find the path of current lisp file. For example,If we located test.lsp file on C driver, the function will return "C:\test.lsp".etc...

 

Thanks for any help.

*Expert Elite*
Lee_Mac
Posts: 1,128
Registered: ‎12-29-2009
Message 2 of 6 (550 Views)

Re: Find current lisp file path

09-05-2013 02:20 AM in reply to: ditran

What do you mean by 'current lisp file'?

Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)
Expert Elite
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Mentor
bhull1985
Posts: 432
Registered: ‎07-17-2013
Message 3 of 6 (538 Views)

Re: Find current lisp file path

09-05-2013 04:09 AM in reply to: ditran

(findfile "yourfile.lsp") in autocad will return the location of "yourfile" within the autocad search paths, if it exists...

hopefully that helps

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please use code tags and credit where credit is due. Accept as solution, if solved. Let's keep it trim people!
Active Contributor
ditran
Posts: 27
Registered: ‎01-28-2013
Message 4 of 6 (517 Views)

Re: Find current lisp file path

09-05-2013 06:19 PM in reply to: bhull1985

Thanks for reply. But I want to find the saved path of lisp file being edited. I want to load other file in same folder which located anywhere.Maybe it's not loacted in Autocad search path.

 

 

Valued Mentor
bgingerich
Posts: 276
Registered: ‎08-29-2011
Message 5 of 6 (478 Views)

Re: Find current lisp file path

09-06-2013 06:26 AM in reply to: ditran

There may be a way to retrieve the "last opened file" location from a registery entry somewhere?  I only have LT at the moment, so I can't help you with the actual entry.  

 

This is the folder for recent files in 2010 LT.  May or may not help you...

HKEY_CURRENT_USER\Software\Autodesk\AutoCAD LT\R15\ACADLT-8001:409\Recent File List

 

HTH

─────────────────────────────────────────────────────────────────────────────────────────────
Brandon Gingerich
*Expert Elite*
Lee_Mac
Posts: 1,128
Registered: ‎12-29-2009
Message 6 of 6 (471 Views)

Re: Find current lisp file path

09-06-2013 06:35 AM in reply to: ditran

ditran wrote:

I want to find the saved path of lisp file being edited.


 

If you are referring to a LISP file that is being edited within the Visual LISP IDE, you could read the *edit-file-history* section of the VLIDE.DSK file.

Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)
Expert Elite
With Mathematics there is the possibility of perfect rigour, so why settle for less?

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community