View Full Version : Automatic AutoLisp load.
andrew.potts
2007-06-20, 12:56 PM
Hi,
I have recently started using Auto Lisp routines and I am a complete novice so forgive me if I ask something trivial or basic!
Can anyone tell me how you get Auto Cad to load in Lisp routines every time you start the Auto Cad program? IE - so you don't have to load up the Auto Lisp routine into every drg you want to use it on.
Thanks in advance for any replies.
ccowgill
2007-06-20, 01:33 PM
Hi,
I have recently started using Auto Lisp routines and I am a complete novice so forgive me if I ask something trivial or basic!
Can anyone tell me how you get Auto Cad to load in Lisp routines every time you start the Auto Cad program? IE - so you don't have to load up the Auto Lisp routine into every drg you want to use it on.
Thanks in advance for any replies.
I prefer to load the routines through Acaddoc.lsp, just creat the file, put it in your highest up support file folder and fill it with load and autoload lines to load your programs
azarko
2007-06-20, 02:53 PM
Hi,
I have recently started using Auto Lisp routines and I am a complete novice so forgive me if I ask something trivial or basic!
Can anyone tell me how you get Auto Cad to load in Lisp routines every time you start the Auto Cad program? IE - so you don't have to load up the Auto Lisp routine into every drg you want to use it on.
Thanks in advance for any replies.
Look this
http://www.theswamp.org/index.php?topic=15057.0
http://www.cadtutor.net/forum/showthread.php?t=1390
CAB2k
2007-06-20, 04:39 PM
I put mine in acaddoc.lsp
Example:
;;; ===============================================
;;; Lisp Routine Loader
;;; AUTOLOAD only loads the routine when needed
;;; ===============================================
;;;------ Lisp name -- Function name ------- Discription -----------------------
(AUTOLOAD "AreaPrt" '("AreaPrt")) ; Print the Area of "POLYLINE" "LWPOLYLINE" "CIRCLE" "ELLIPSE"
(AUTOLOAD "arrow line" '("arw")) ; draw a arrow line on stairs, plan view
(AUTOLOAD "ArrowDrainage" '("darrow")) ; draw a drainage arrow
(AUTOLOAD "Arrows by Tim W" '("DPA")) ; draw a hollow arrow, by Tim Willey
(AUTOLOAD "Angle Bisect" '("BISECT")) ;
(AUTOLOAD "Block 2 Layer 0-CAB" '("FixBlock")) ; Repair Block Layers
(AUTOLOAD "Block UnmirrorCAB" '("bum")) ; Unmirror blocks picked
(AUTOLOAD "BlockDel CAB" '("BlockDel")) ; Delete ALL matching blocks & purge the DWG
(AUTOLOAD "BlkInsert" '("blkinsert")) ; Block Menu Insert Routine
(AUTOLOAD "BLOCK Ent List CAB" '("BlockInfo")) ; Block Info 2 File
(AUTOLOAD "BrAt" '("brat")) ; Break Line @
(AUTOLOAD "BrkDbl-cab" '("DZ")) ; Double Break Symbol
(AUTOLOAD "BrkSym" '("BRK")) ; Single Break Symbol
I put mine in acaddoc.lsp
Example:
;;; ===============================================
;;; Lisp Routine Loader
;;; AUTOLOAD only loads the routine when needed
;;; ===============================================
;;;------ Lisp name -- Function name ------- Discription -----------------------
(AUTOLOAD "AreaPrt" '("AreaPrt")) ; Print the Area of "POLYLINE" "LWPOLYLINE" "CIRCLE" "ELLIPSE"
(AUTOLOAD "arrow line" '("arw")) ; draw a arrow line on stairs, plan view
(AUTOLOAD "ArrowDrainage" '("darrow")) ; draw a drainage arrow
(AUTOLOAD "Arrows by Tim W" '("DPA")) ; draw a hollow arrow, by Tim Willey
(AUTOLOAD "Angle Bisect" '("BISECT")) ;
(AUTOLOAD "Block 2 Layer 0-CAB" '("FixBlock")) ; Repair Block Layers
(AUTOLOAD "Block UnmirrorCAB" '("bum")) ; Unmirror blocks picked
(AUTOLOAD "BlockDel CAB" '("BlockDel")) ; Delete ALL matching blocks & purge the DWG
(AUTOLOAD "BlkInsert" '("blkinsert")) ; Block Menu Insert Routine
(AUTOLOAD "BLOCK Ent List CAB" '("BlockInfo")) ; Block Info 2 File
(AUTOLOAD "BrAt" '("brat")) ; Break Line @
(AUTOLOAD "BrkDbl-cab" '("DZ")) ; Double Break Symbol
(AUTOLOAD "BrkSym" '("BRK")) ; Single Break SymbolNice.
These are invoked (loaded) upon using the command that's within the lisp routine?
So you type your lisp command and it loads it, and then runs it too?
CAB2k
2007-06-20, 04:52 PM
Yes, loads & runs the lisp only when needed.
Yes, loads & runs the lisp only when needed.Awesome!
I'd heard of it but didn't know how to do it.
Thank for the tip!
andrew.potts
2007-06-20, 05:58 PM
Thanks for the help - All I have done is put the lsp file in the 'start up suite' that is located in 'load applications' from the Tools menu.
It seems to be working so far.
If I wanted to use the acaddoc.lsp file - how do you do it?
CAB2k
2007-06-20, 10:26 PM
See if you have one already. Paste this at the command line.
Command: (findfile "acaddoc.lsp")
"C:\\PROGRAM FILES\\ACAD2000\\support\\acaddoc.lsp"
If you have one, edit it.
If you don't have one, create one in the directory where you find this file.
Command: (findfile "acad.pat")
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.