PDA

View Full Version : Bad Argument


omorah
2009-03-12, 07:12 PM
I have the following errors after opening AutoCAD 2009.
How can I locate the files which has the errors?
Windows Explorer could not locate the word "lentityp nil" or "stringp nil" with the the "A word or phrase in the file" option.

ERRORS:
AutoCAD menu utilities loaded.; error: bad argument type: stringp nil
AutoCAD menu utilities loaded.Loaded...; error: bad argument type: lentityp nil

ccowgill
2009-03-13, 12:38 PM
I have the following errors after opening AutoCAD 2009.
How can I locate the files which has the errors?
Windows Explorer could not locate the word "lentityp nil" or "stringp nil" with the the "A word or phrase in the file" option.

ERRORS:
AutoCAD menu utilities loaded.; error: bad argument type: stringp nil
AutoCAD menu utilities loaded.Loaded...; error: bad argument type: lentityp nil
you wont find those lines within a file, they are error codes, it means:

((= ErrorMsg$ "bad argument type: stringp nil") "String variable not defined.")
((= ErrorMsg$ "bad argument type: lentityp nil") "entget passed a nil.")

meaning you have some sort of a custom routine that is being loaded that is not coded properly, or not being called properly. the only way to really figure it out is to load your custom routines one at a time and trace the error. At our offices, I added print lines to the startup routines that allow me to determine where in the order our startup failed. It adds a lot of extra text to the startup, but it makes it a heck of a lot easier to troubleshoot.

TimSpangler
2009-03-13, 06:03 PM
One of the things that I did here (at work) was to add to line to all of out major lisps (acad.lsp, acaddoc.lsp, company.lsp as well as any .mnl)

(princ "\n Loading xxxx.lsp") at the begining
(princ "\n xxx.lsp loaded succefully....") at the very end

This way I can tell were in the load process I get a failure. This allow me to track it from there.