Am I using acad.lsp and acaddoc.lsp poorly?
I am using defun-q and appending S::STARTUP (as per the help files). This much works in general.
The ony problem is if they have local variables. On autocad startup, the acad.lsp is added to S::STARTUP. Then the acaddoc.lsp is added to S::STARTUP. For arguments sake, lets assume acad.lsp is the first thing in the S::STARTUP (nothing before it). In this case, the acad.lsp functions will load just fine, then the S::STARTUP will cancel because it reads the ( / local variables) line from the acaddoc.lsp, which are now somewhere in the middle of the S::STARTUP - no longer defined as local variables. Of course the error is a numberp nil because it treats it as division.
I hope this all makes sense. Do any of you have suggestions or other methods to try? I appreciate the help.
p.s. the acaddoc.lsp loads just fine on any subsequent drawings opened after startup, when acad.lsp is not loading...so I am pretty positive it is the local variables shown in the middle of the S::STARTUP causing the error.