Results 1 to 7 of 7

Thread: Rescuing my lisp

  1. #1
    Active Member JSelf's Avatar
    Join Date
    2000-12
    Posts
    71

    Default Rescuing my lisp

    This is a really dumb question caused by a really dumb mistake.

    If I have an unsaved lisp loaded into memory from the Visual Lisp IDE, and I close the lisp without saving...is there a way to extract the loaded lisp from memory somewhere?

    Thanks,
    Jason

  2. #2
    Certified AUGI Addict rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Houston
    Posts
    7,520

    Default Re: Rescuing my lisp

    If it was defined with (defun-q), then you can do this prefix the function name with a (!) to view the code (at the command line)

    Example:
    Command: !C:myfunc
    Last edited by rkmcswain; 2010-03-10 at 06:14 PM. Reason: edit

  3. #3
    100 Club
    Join Date
    2009-04
    Location
    Houston, TX
    Posts
    169

    Default Re: Rescuing my lisp

    Quote Originally Posted by rkmcswain View Post
    If it was defined with (defun-q), then you can do this prefix the function name with a (!) to view the code (at the command line)

    Example:
    Command: !C:myfunc
    Explain (defun-q)... or is "-q" just representative of the rest of the code..?

  4. #4
    Administrator RobertB's Avatar
    Join Date
    2001-08
    Location
    Dallas TX USA
    Posts
    5,825

    Default Re: Rescuing my lisp

    Quote Originally Posted by JSelf View Post
    If I have an unsaved lisp loaded into memory from the Visual Lisp IDE, and I close the lisp without saving...is there a way to extract the loaded lisp from memory somewhere?
    Probably not, because I'm betting you used defun and not defun-q as R.K. mentioned.
    R. Robert Bell
    Design Technology Manager
    S P A R L I N G
    Opinions expressed are mine alone and do not reflect the views of Sparling.

  5. #5
    Administrator RobertB's Avatar
    Join Date
    2001-08
    Location
    Dallas TX USA
    Posts
    5,825

    Default Re: Rescuing my lisp

    Quote Originally Posted by M. Kubitza View Post
    Explain (defun-q)... or is "-q" just representative of the rest of the code..?
    No, it is not. Read about the differences between defun and defun-q in the Developer's Guide.
    R. Robert Bell
    Design Technology Manager
    S P A R L I N G
    Opinions expressed are mine alone and do not reflect the views of Sparling.

  6. #6
    Certified AUGI Addict rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Houston
    Posts
    7,520

    Default Re: Rescuing my lisp

    Sorry, that was a really big IF, but it was the only way I can think of.

    I'm assuming that the lisp interpreter compiles (if you don't like "compile", use your own word here...) the code when you use (defun) or otherwise load code into memory, therefore there is nothing to retrieve.

  7. #7
    Active Member JSelf's Avatar
    Join Date
    2000-12
    Posts
    71

    Default Re: Rescuing my lisp

    I just thought there might be a way...wasn't a whole lot of code to re-write
    I seem to remember leaving trace and animate and then re-opening autocad...and it brought code up, It's been years since I have done that though.

    Now reading what defun-q's purpose is I see why it used to act that way.

    Thanks,
    Jason

Similar Threads

  1. Replies: 9
    Last Post: 2012-01-21, 06:58 AM
  2. LISP Debug Broken - Need Lisp to VBA Convert Help
    By bsardeson in forum VBA/COM Interop
    Replies: 4
    Last Post: 2010-10-06, 05:37 PM
  3. Transverse Lisp (Skew Lisp)
    By oktaychetin in forum AutoLISP
    Replies: 3
    Last Post: 2010-05-26, 11:14 AM
  4. Programacion en Lisp y Visual Lisp
    By ralmavar in forum Español - AutoCAD / AutoCAD LT
    Replies: 7
    Last Post: 2009-06-15, 01:52 PM
  5. non lisp cursor location for lisp getpoint
    By dtuttle in forum AutoLISP
    Replies: 3
    Last Post: 2005-05-10, 11:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •