+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Full Member
    Using
    AutoCAD 2009
    Join Date
    Mar 2009
    Posts
    75

    Default problems with loading lisp

    Registered forum members do not see this ad.

    I have a number of lisp routines that I use in my day to day work. But I am facing a problem which is sometimes very painful.

    I cannot keep my lisp code in the office PC, so I load them from USB stick using a lisp file called LOADER, which contains code to load all the lisp routines. The format of LOADER file is like given below

    (load "j:/lisp/a.lsp")
    (load "j:/lisp/b.lsp")
    ......

    Now the problem is that different computer detect the USB as different drives such as H:/ or G:/. So depending on the drive name I have to make changes to the lisp file LOADER.

    Secondly some lisp routines load other lisp routines to do their job so other than LOADER file I might need to modify code in other lisp routines also to avoid getting the LOAD error.

    Is their some solution for this issue.

    Thanks.

  2. #2
    Senior Member
    Using
    Map 3D 2008
    Join Date
    Apr 2009
    Location
    The one after 909
    Posts
    402

    Default

    Try this. This goes through the alphabet, looking for all drives that have a /lisp/ directory, and then it loads all the lisps in that directory. I don't think that's entirely what you want, but it's a start.

    Code:
    (defun c:loadlots( / a b c)
      (foreach fv1 (abc)
        (if (setq a (vl-directory-files (strcat fv1 ":/lisp/") "*.lsp"))
          (foreach fv2 a
        (load (strcat fv1 ":/lisp/" fv2))
        )
          )
        )
      (princ)
      )
    
    (defun abc( / a b)
      (setq a 64)
      (repeat 26 (setq b (cons (chr (setq a (1+ a))) b)))
      b
      )
    ~* And, in the end, the love you take *~
    ~* Is equal to the love you make *~
    - The Beatles -


    GrPlayground
    / Text Find/Replace / Batch Engine / Tower Defense

  3. #3
    Forum Deity Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draftsman
    Discipline
    Mechanical
    Using
    AutoCAD 2014
    Join Date
    Oct 2009
    Location
    Lives in Abu Dhabi
    Posts
    2,628

    Default CUI from Tools menu

    Hi Salman.
    My recommandations to you ,is to keep your Lisp files in a certain place in the drive c: or d: doesn't matter and use the command cui in Autocad to load all your Lisp normally as well as Autocad running .

    Regards,
    Tharwat

  4. #4
    Senior Member
    Computer Details
    jammie's Computer Details
    Operating System:
    Ubuntu / XP / W8
    Discipline
    Civil
    jammie's Discipline Details
    Occupation
    Design Technician
    Discipline
    Civil
    Using
    AutoCAD 2012
    Join Date
    May 2006
    Location
    Ireland
    Posts
    299

    Default

    Registered forum members do not see this ad.

    There was a thread posted over on another website which may be of help

    http://www.theswamp.org/index.php?topic=32565.0

    Regards

    Jammie

Similar Threads

  1. Problems with loading applications
    By CadKid in forum Civil 3D & LDD
    Replies: 5
    Last Post: 26th Sep 2009, 12:36 am
  2. Problems loading lsp
    By bgallagher in forum AutoLISP, Visual LISP & DCL
    Replies: 10
    Last Post: 1st Aug 2008, 08:41 pm
  3. Huge problems (loading DVB file)
    By erik_NL in forum AutoLISP, Visual LISP & DCL
    Replies: 4
    Last Post: 29th Mar 2008, 09:13 pm
  4. Problems loading autoCAD in Drawing Express
    By johnnymckeown in forum AutoCAD Drawing Management & Output
    Replies: 0
    Last Post: 3rd Mar 2006, 11:05 am
  5. Problems with loading forum webpages
    By hyposmurf in forum Feedback
    Replies: 3
    Last Post: 24th Apr 2004, 08:09 pm

Bookmarks

Posting Permissions

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