CAD Managers

CAD Managers

Reply
*pkirill
Message 1 of 39 (57 Views)

Cleanup before migration to 2007...Your thoughts?

57 Views, 38 Replies
06-06-2006 08:05 AM
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!
*FG
Message 2 of 39 (57 Views)

Re: Cleanup before migration to 2007...Your thoughts?

06-06-2006 09:40 AM in reply to: *pkirill
When you say "autoloading" do you mean you are using this type of code in
your MNL?:

(autoload "filename" '("command"))

This code example will define a short command that will load quickly and
prevent the full lisp from loading until it is called for.



"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!
*pkirill
Message 3 of 39 (57 Views)

Re: Cleanup before migration to 2007...Your thoughts?

06-06-2006 10:35 AM in reply to: *pkirill
Yup. That's what I'm doing with most of the externals. I plan to do it with
all of them, it's just taking a while to go through all the code. The guy
before me was a bit of security nut (which is both good an bad, I guess) so
a lot fo the code is intertwined...


"FG" wrote in message
news:5197261@discussion.autodesk.com...
When you say "autoloading" do you mean you are using this type of code in
your MNL?:

(autoload "filename" '("command"))

This code example will define a short command that will load quickly and
prevent the full lisp from loading until it is called for.



"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!
*David Allen
Message 4 of 39 (57 Views)

Re: Cleanup before migration to 2007...Your thoughts?

06-06-2006 05:25 PM in reply to: *pkirill
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!
*pkirill
Message 5 of 39 (57 Views)

Re: Cleanup before migration to 2007...Your thoughts?

06-07-2006 11:09 AM in reply to: *pkirill
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!
*FG
Message 6 of 39 (57 Views)

Re: Cleanup before migration to 2007...Your thoughts?

06-07-2006 01:24 PM in reply to: *pkirill
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!
*Ron Meicho
Message 7 of 39 (57 Views)

Re: Cleanup before migration to 2007...Your thoughts?

06-07-2006 01:57 PM in reply to: *pkirill
Here is what I do....
I have one file (lisp loader) that just has just load calls to specific lisp
routines. All or most of my lisp are separate files. This lisp loader is
much like aliases in that it only loads routines for use as they are needed
(this "lisp loader" call is put in the "acaddoc.lsp" to load on each
session). I then can add to or modify the "lisp loader" file at will for all
to use. I make each individual alias or "load call" the same as the its
routine "run call" so the user only has to remember one alias. This way
routines are only loaded as needed and I only need a couple of lines of code
in the acaddoc.lsp which can be copied to the next version update.

Hope this helps.

Ron Meicho


"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!
*pkirill
Message 8 of 39 (57 Views)

Re: Cleanup before migration to 2007...Your thoughts?

06-08-2006 07:35 AM in reply to: *pkirill
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!
*pkirill
Message 9 of 39 (57 Views)

Re: Cleanup before migration to 2007...Your thoughts?

06-08-2006 07:36 AM in reply to: *pkirill
" I only need a couple of lines of code
in the acaddoc.lsp which can be copied to the next version update."

I like that idea - thanks!
*SD'y
Message 10 of 39 (57 Views)

Re: Cleanup before migration to 2007...Your thoughts?

06-08-2006 07:45 AM in reply to: *pkirill
Could you explain how this works, or how to use it?
Thanks,

"pkirill" wrote in message
news:5199740@discussion.autodesk.com...
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!
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Manufacturing CAD & IT Manager Resource
Additional information for installing, licensing & deploying Inventor, the Product Design Suites and Factory Design Suites.