Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Check to see if file exists

  1. #11
    All AUGI, all the time CAB2k's Avatar
    Join Date
    2016-01
    Location
    Brandon, Florida
    Posts
    687
    Login to Give a bone
    0

    Default Re: Check to see if file exists

    Quote Originally Posted by ccowgill
    Is there a way to see if a particular routine or file is loaded?
    Just test the name of the lisp function.
    If the name returns nil it is not loaded.
    This example assumes a lisp file "MyLisp.lsp" and a defun c:MyLisp
    Code:
    (if (not c:MyLisp)
      (load "myLisp.lsp")
    )
    or use

    Code:
    (or c:Mylisp (load "myLisp.lsp"))
    or use

    Code:
    (autoload "myLisp.lsp" '("MyLisp"))
    Last edited by CAB2k; 2006-04-08 at 01:00 PM.

  2. #12
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,197
    Login to Give a bone
    0

    Default Re: Check to see if file exists

    Quote Originally Posted by CAB2k
    Just test the name of the lisp function.
    If the name returns nil it is not loaded.
    This example assumes a lisp file "MyLisp.lsp" and a defun c:MyLisp
    Code:
    (if (not c:MyLisp)
    (load "myLisp.lsp")
    )
    or use

    Code:
    (or c:Mylisp (load "myLisp.lsp"))
    or use

    Code:
    (autoload "myLisp.lsp" '("MyLisp"))
    That is simple and to the point, it sounds like exactly what I am looking for, I will try it out and make sure it works for what I need, thanks

Page 2 of 2 FirstFirst 12

Similar Threads

  1. 2010: error: Unable to load customization file That customization Group already exists
    By aheintze351177 in forum AutoCAD 3D (2007 and above)
    Replies: 0
    Last Post: 2013-01-09, 10:06 PM
  2. Replies: 0
    Last Post: 2011-05-30, 07:07 AM
  3. Visual Lisp Help - Check if URL Exists
    By caddog71 in forum AutoLISP
    Replies: 13
    Last Post: 2010-10-19, 02:18 AM
  4. Check if Custom Drawing Property exists
    By ccowgill in forum AutoLISP
    Replies: 9
    Last Post: 2007-08-29, 01:07 PM
  5. Need help verifying file exists
    By stephen.coff in forum AutoLISP
    Replies: 3
    Last Post: 2006-09-18, 01:48 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
  •