Author Topic: Loading Lisp Routines between drawings  (Read 3509 times)

0 Members and 1 Guest are viewing this topic.

vinnyg

  • Bull Frog
  • Posts: 225
Loading Lisp Routines between drawings
« on: December 13, 2007, 10:02:48 AM »
Hi All,

I am having trouble keeping my lisp routines loaded between drawings that I open
and now just realized that when I open a drawing and load a lisp routine, after the lisp
routine finishes, when I type in the lisp command again, it won't start the lisp routine
even while I'm in the same drawing. I checked the "lispinit" variable. I went to preferences
and made sure that the checkbox for loading lisp routines between drawings was checked.

What the H--- is going on?  Using r14. I never had this problem before. Help

Vinny

CAB

  • Global Moderator
  • Seagull
  • Posts: 10312
Re: Loading Lisp Routines between drawings
« Reply #1 on: December 13, 2007, 10:20:07 AM »
In your acaddoc.lsp add this line of code.
Code: [Select]
(load "MyAutoLoad.lsp")
Then create a lisp file called MyAutoLoad.lsp in the search path. In it add your load lisp code;
Here is a clip from my file:

Code: [Select]
;;; ===============================================
;;;    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 "Block Copy Will Deloach" '("CopyB")) ; Block copy to all tabs
(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
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

deegeecees

  • Guest
Re: Loading Lisp Routines between drawings
« Reply #2 on: December 13, 2007, 10:37:07 AM »
Look into these variables as well:

acadlspasdoc
SDI

vinnyg

  • Bull Frog
  • Posts: 225
Re: Loading Lisp Routines between drawings
« Reply #3 on: December 13, 2007, 11:02:01 AM »
Thanks guys,

I'll give it a try.

Vinny

Eloquintet

  • Gator
  • Posts: 3206
Re: Loading Lisp Routines between drawings
« Reply #4 on: December 13, 2007, 12:09:56 PM »
yeah vinny this is the method i use as well. it acts as a demand load and works well. i didn't really read the details of the posts above but i would just say keep your autolad file external and just load it from acaddoc.lsp so if you need to reinstall you don't risk wiping out your stuff and you just need to add the load upon reinstall.
Dan

AutoCAD Architecture 2015