Yes, to further explain blackBox's post
Within any folder that is within your support file search paths
Tools->options->Files
or
by typing (findfile "acaddoc.lsp") into your autocad and browsing to the folder it tells you
there's a file called acaddoc.lsp
or if (findfile "acaddoc.lsp") returns "nil"
that means that it has yet to be created.
But you'd either create within a folder in your SFSP or browse to the existing acaddoc.lsp file
and you'd add the lines to automatically load your routine (we're going to continue to call it "foo")
Code:
(if (not foo)(load "foo.lsp")) ;this does a simple check to see if the command "foo" is available, if not it loads the "foo.lsp"
....get to the end of the acaddoc.lsp file and...
(C:FOO)
just almost exactly like blackbox explained it.
You will want to ensure that acaddoc.lsp is within your search paths and that "load acad lsp with every drawing" is checked in the options for autocad.
This will load your "foo" routine into each drawing, and if placed at the very bottom to where there's nothing beyond (C:FOO)
it will invoke the routine upon opening each drawing or new instance of autocad, which should pre-set items to your layers as intended.
It will also make the command available for anytime anyone needs to run it manually by simple typing "foo" into autocad without the quotes.
Hope this wasn't too redundant I just wanted to explain the usage of acaddoc.lsp a little more