+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 19

Thread: lisp loader

  1. #1
    Full Member
    Discipline
    Multi-disciplinary
    Using
    AutoCAD 2016
    Join Date
    Nov 2017
    Posts
    68

    Default lisp loader

    Registered forum members do not see this ad.

    i have been racking my brain trying to figure this out. i am sure that this is something that is very simple but being so new to the lisp world i am struggling.

    i am looking to have one master lisp that will load all the lisp routines that i have. not sure if this would be the best way to do it, or if i should just visit the "options" and add the location of these to the support path that way it is loaded always.

    i read a little able acaddoc.lsp but being so new i am just losing myself even more with that. can anyone provide a little direction?

    thank you

  2. #2
    Senior Member
    Discipline
    Manufacture
    Using
    AutoCAD 2016
    Join Date
    Apr 2015
    Posts
    102

    Default

    See LeeMac's ACADDOC Creator: http://www.lee-mac.com/acaddoccreator.html

    In your acaddoc.lsp file, add
    Code:
    (load "yourfilename.lsp)
    the name of the file from LeeMac's lisp routine.

    All files must be in your support path.

    When you open a new drawing, the .lsp file will only load when you type the command for it.
    Philip

  3. #3
    Full Member
    Discipline
    Multi-disciplinary
    Using
    AutoCAD 2016
    Join Date
    Nov 2017
    Posts
    68

    Default

    Quote Originally Posted by PDuMont View Post
    See LeeMac's ACADDOC Creator: http://www.lee-mac.com/acaddoccreator.html

    In your acaddoc.lsp file, add
    Code:
    (load "yourfilename.lsp)
    the name of the file from LeeMac's lisp routine.

    All files must be in your support path.

    When you open a new drawing, the .lsp file will only load when you type the command for it.
    thank you for this info. lee mac has so much stuff that i tend to get lost on his site. another question is, where i work they do not like us saving things like this to the server and/or the desktop (they go thru and wipe out stuff like this at least once a week)

    would i be able to save it all to a thumb drive and then just path that? and of course if that is something that does work then it would only load if that thumb drive is in the computer. just a thought

  4. #4
    Senior Member
    Discipline
    Manufacture
    Using
    AutoCAD 2016
    Join Date
    Apr 2015
    Posts
    102

    Default

    Thumb drive should work I think, but yes, it would error out if not connected.
    I work from C:\users\public\documents\"my stuff here" on my machine, do they monitor that since it is a default location?
    Philip

  5. #5
    Full Member
    Discipline
    Multi-disciplinary
    Using
    AutoCAD 2016
    Join Date
    Nov 2017
    Posts
    68

    Default

    i dont even have that path! but that gave me an idea that i will just keep my back up's (original files) on the thumb drive and then path those over to somewhere on my U: drive (that is what they gave us.)


    i will have to go take a look at the acaddoc.lsp from lee mac. thank you again

  6. #6
    Senior Member
    Discipline
    Manufacture
    Using
    AutoCAD 2016
    Join Date
    Apr 2015
    Posts
    102

    Default

    You're welcome.

    My original reply was hastily typed, let me know if you need more info.

    Good luck!
    Philip

  7. #7
    Full Member
    Discipline
    Multi-disciplinary
    Using
    AutoCAD 2016
    Join Date
    Nov 2017
    Posts
    68

    Default

    i was quickly looking at the acaddoc.lsp file and it is of course well written, but so good that i am struggling to understand where to add my stuff at. i have a file that i got approved to add a few things of my own that work for me but they restrict editing.

    this is what they have:

    Code:
    (defun c:K ()
      (setvar "POLARMODE" 2)
      (setvar "osmode" 551)
      (setvar "POLARANG" (angtof "15"))
    )
    ;;when you type K, it resets your osnaps to your custom setting
    
    ;;Custom Routines
    
    	(defun c:c0 () (command "_copybase" "0,0") )
    	(defun c:v0 () (command "_pasteclip" "0,0") )
    	(defun c:ZZ () (command "layfrz") )
    
    (load "_RC-CLOUDS")
    (defun c:KL () (load "_KL") (C:KL))
    ;;DRAW BACKWARDS 3-POINT LEADER
    (defun c:T2MT () (load "T2MT-MT2T") (C:T2MT))
    ;;TEXT TO MTEXT
    (defun c:VB () (load "_VB") (C:VB))
    ;;VIEWPORT BOX IN MODELSPACE
    (defun c:XRR () (load "XRR") (C:XRR))
    ;;XREF RELOAD
    (defun c:XRV () (load "XRV") (C:XRV))
    ;;XREF RELOAD WITH VISRETAIN
    (defun c:XRU () (load "XRU") (C:XRU))
    ;;XREF DETACH
    (defun c:explodable () (load "explodable") (C:explodable))
    ;;explodable
    (defun c:cleanbase () (load "cleanbase") (C:cleanbase))
    ;;Clean base drawing
    (defun c:cleantitle () (load "cleantitle") (C:cleantitle))
    ;;Clean title drawing
    
    	(Defun c:ERD () (load "_ERD") (c:ERD))
    	(Defun c:ERH () (load "_ERD") (c:ERH))
    	(Defun c:ERT () (load "_ERD") (c:ERT))
    
    (Defun C:QS () (command ".qsave") (princ))
    (defun c:read ()
      (defun c:qs () (alert "NO! NO! NO! NO! NO! NO!"))
    )
    
    
    (defun c:Dave()
      (load "_0Dave.lsp")
      (alert "Dave - list of commands \nK - Your ACAD Defaults \nQS - Quick Save \nERH Erase Hatch \nMA Match Properties\nREAD - removes Quick Save command \nKL - Draw backwards three point leader \nCleantitle - Clean title drawing \nCleanBase - Clean base drawing\nRCC - Rev Cloud Sketch \nRCB - Rev Cloud Block")
    )
    
    (print "Dave Lisp Loaded Successfully!")
    (princ)
    
    (defun c:MA () (COMMAND "MATCHPROP") )
    ;;XREF DETACH
    i am wondering if i can just copy this layout and ad my own things. and just give

    Code:
    (defun c:Dave() (load "_0Dave.lsp")
    or would i even need to have the (defun c:dave() in there? could i change that to

    Code:
    (;;defun c:Dave()
    just to have this show up as a note so if i am looking at it i know the reason why i have this and if i want to be able to delete it or not? just a few thoughts.

  8. #8
    Senior Member
    Discipline
    Manufacture
    Using
    AutoCAD 2016
    Join Date
    Apr 2015
    Posts
    102

    Default

    See, I lead you wrong already, you want this:

    http://www.lee-mac.com/autoloader.html
    Philip

  9. #9
    Full Member
    Discipline
    Multi-disciplinary
    Using
    AutoCAD 2016
    Join Date
    Nov 2017
    Posts
    68

    Default

    ok so with this would i then path it or would i add this to my start up suit?

    will this allow me to lets say open up a drawing and just type "invert" one of my lisp routines that someone here helped me write (well after all said and done they wrote it) and it will work normally? and with the said lisp that i have i also have a .dcl and a block that i have to load into this.

    i am fine making a change if it is needed. either way works for me.

  10. #10
    Senior Member
    Discipline
    Manufacture
    Using
    AutoCAD 2016
    Join Date
    Apr 2015
    Posts
    102

    Default

    Registered forum members do not see this ad.

    OK, I am a bit confused as to what you are doing.

    Here's is how I'm set up:

    Folder structure = "AutoCAD Lisp\Lisp 1\Lisp"

    "Lisp 1" folder has my accaddoc.lsp file (autocad will only use 1 of these)
    Inside this lisp file is this:
    Code:
    (vl-load-com)
    (acad-push-dbmod)
    (load "PDuMont-Commands")
    (load "PDuMont-Lisp")
    (load "LayerAuto.lsp")
    (load "AutoSave.lsp")
    (acad-pop-dbmod)
    "Lisp" folder has my pile of lisp routines, dcl files, sld files etc.
    Run LeeMac's autoloader lisp on the folder with your pile of routines
    and you should end up with a file that looks like this:
    Code:
    (autoload "C:/Users/Public/Documents/AutoCAD Lisp/lisp/ArrowArcV1-2.lsp" '("AARC"))
    (autoload "C:/Users/Public/Documents/AutoCAD Lisp/lisp/AddObjectsToBlockV1-1.lsp" '("A2" "RF"))
    (autoload "C:/Users/Public/Documents/AutoCAD Lisp/lisp/AllLayerOff.lsp" '("ALO"))
    ;(autoload "C:/Users/Public/Documents/AutoCAD Lisp/lisp/AnonymousBlock-Rename.lsp" '("UNANONALL" "UNANON"))
    (autoload "C:/Users/Public/Documents/AutoCAD Lisp/lisp/Arc2Circle.lsp" '("A2C"))
    (autoload "C:/Users/Public/Documents/AutoCAD Lisp/lisp/AreaText.lsp" '("AT"))
    (autoload "C:/Users/Public/Documents/AutoCAD Lisp/lisp/Attribute-Constant-Flip2x.lsp" '("AF"))
    (autoload "C:/Users/Public/Documents/AutoCAD Lisp/lisp/AutoDado.lsp" '("DD" "CD" "DD2"))
    (autoload "C:/Users/Public/Documents/AutoCAD Lisp/lisp/AutoExtrude.lsp" '("LE" "RECE" "CE"))
    (autoload "C:/Users/Public/Documents/AutoCAD Lisp/lisp/AutoRotate.lsp" '("3DR"))
    This is the file pointed to in the acaddoc.lsp
    Code:
    (load "PDuMont-Lisp")
    Again, all files must be in your autocad support path.
    Philip

Similar Threads

  1. Judge ET tool, if not installed, not loader and prompt.
    By andy_lee in forum AutoLISP, Visual LISP & DCL
    Replies: 11
    Last Post: 19th May 2014, 12:51 pm
  2. Judge cad version,If version is too low,not loader and prompt.
    By andy_lee in forum AutoLISP, Visual LISP & DCL
    Replies: 9
    Last Post: 19th May 2014, 08:52 am
  3. [LISP] First time writing LISP routine... trying to rotate, move and scale
    By chiimayred in forum AutoLISP, Visual LISP & DCL
    Replies: 6
    Last Post: 18th Jul 2013, 06:02 pm
  4. frontend loader
    By JENKAT in forum AutoCAD General
    Replies: 0
    Last Post: 11th Apr 2013, 09:20 pm
  5. Opengl loader for autocad supported formats
    By 3dvdt in forum AutoCAD Drawing Management & Output
    Replies: 2
    Last Post: 6th Oct 2006, 01:34 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