Ah - about a year ago I went through all the LISPs we have and inserted a
call to another little routine called (lisplog) which rights out the
command, date and time, and user to a csv file. I am going through and
evaluating a bunch of our routines to see if they aren't being used because
they are useles or because no on knows about them...
In case anyone wants it, here it is. I can't take full credit as I had help
from this NG and the LISP NG for the reactor part...
;;;(lisplog) - add this inside any LISP routine you want to log
(defun setlispname (reactor name)
(setq *lispname* (car name))
)
(vlr-lisp-reactor nil '((:vlr-lispWillStart . setlispname)))
(defun lisplog ()
(setq *CDATE* (rtos (getvar "cdate") 2 4)
YEAR (substr *CDATE* 3 2)
MONTH (itoa (atoi (substr *CDATE* 5 2)))
DAY (itoa (atoi (substr *CDATE* 7 2)))
)
(setq CURDATE (strcat MONTH "/" DAY "/" YEAR))
(setq f (open (strcat "G:/CAD Standards/LogFiles/" (getvar "LOGINNAME")
"_Lisp.log") "a")
)
(write-line (strcat (getvar "LOGINNAME") "," CURDATE "," *lispname*) f)
(close f)
(princ)
)
"FG"
wrote in message
news:5199002@discussion.autodesk.com...
Its also a good time to ask everyone which commands are no longer being
used. We seem to remove a few each year as autodesk incorporates them into
the program.
"pkirill" wrote in message
news:5198784@discussion.autodesk.com...
I don't think it's the "autoload" code spcifically that's slow. I'm looking
at the process as a whole. And on the whole, it's too slow for my taste.
I've been moving a bunch of the preliminary stuff to the acaddoc.lsp and
that seems to speed things up a bit. There are also some vba macros that
load up into each drawing - why I don't know yet. There seems to be no
reason why they can't load when the command is called. I think I can back
those out to the mnl's...
I guess, I'm just looking for some creative ideas for minimizing startup
time. Your shortcut idea is a nice one...
Also, for a while I was in the habit of grouping a bunch of similar routines
into one LISP file. For example we have a bunch of block insertion routines
that control insertion scale, layering, insert multiple, etc. I put them all
in one BlockInsertion.LSP. Some have upwards of 20 small routines in them. I
think these are part of what's bogging me down and I need to harvest the
C:XXXX and put those in an autoload list.
"David Allen" wrote in message
news:5197904@discussion.autodesk.com...
Are you saying that the autoload code is slow?
What I do in my shortcut key lisp and my menu's is the simple code of
(defun c:G ()
(ECHOOFF) (princ "\nMacro >\tGlue: ")
(if (not c:glue)(load "glue.lsp")) (c:glue)
(princ)
)
or in my menu
^C^C^P(if (not c:MXREF)(load "MULT-XREF.lsp"))^P MXREF
The only code I place in my .mnl is code to place the pulldown menu in the
list
I have an acaddoc.lsp that loads my shortcuts, variable settings, config and
a few
other items that have to run on every drawing.
I too have 4 decipline menu's
I don't load much code per decipline.
Not sure what else your code could be doing
--
Dave
"pkirill" wrote in message
news:5197024@discussion.autodesk.com...
I am just starting to get us ready to migrate from AutoCAD 2005 to AutoCAD
2007 and I'm trying to fine tune a menu system that has not really been
touched since 2002. We basically have 4 menus (MNU's) - one for "the
company" and one for each discipline (Electrical , HVAC, Plumbing). Each of
these menus has an MNL associated that loads a TON of lisp routines and
variables. Most of the LISP routines I have converted to "autoloading", but
the load time for these menus is significant and they of course load with
every drawing. Some of the routines are external files, some are codes right
in the MNL.
What I'm hoping for is that someone(s) can point me in a direction(s) that
allows me to load these routines once and minimize the time it takes to load
them. I'm thinking it will involve some combination of partial CUIs,
workspaces, acad.lsp and acaddoc.lsp...
I'm starting this installation with a clean slate if it kills me (as long as
it doesn't kill production)...
Thanks for any help!