Error Message Troubleshooter

This page provides a brief guide detailing the possible causes of a selection of common error messages received when executing an AutoLISP program.

Note that the list below is by no means a complete reference.

Error Message Possible Cause
malformed list on input
The code is missing one or more right parentheses.
extra right paren on input
The code has too many right parentheses.
malformed string on input
The code contains a string which is missing a string delimiter ( " ).
too many arguments
A function has been evaluated with too many parameters.
too few arguments
A function has been evaluated with too few required parameters.
Function cancelled
The user has pressed the Esc key whilst running an AutoLISP function.
quit / exit abort
Either the (exit) or (quit) AutoLISP functions have been evaluated.
Application ERROR: Console break
The user has pressed the Esc key whilst the program is evaluating the grread function without bit 3 (8) set in the allkeys parameter.
bad argument type: numberp: <value>
A function requiring a numerical argument has been passed an argument of incorrect data type with the value noted in the error message.
bad argument type: fixnump: <value>
A function requiring an integer argument has been passed an argument of incorrect data type with the value noted in the error message.
bad argument type: stringp <value>
A function requiring a string argument has been passed an argument of incorrect data type with the value noted in the error message.
bad argument type: lselsetp <value>
A function requiring a selection set argument has been passed an argument of incorrect data type with the value noted in the error message. This is usually a result of passing the sslength or ssnamex function a null selection set argument.
bad argument type: lentityp <value>
A function requiring an entity argument has been passed an argument of incorrect data type with the value noted in the error message. Usually a result of passing the entget function a null entity argument.
bad argument type: listp <value>
A function requiring a list argument has been passed an argument of incorrect data type with the value noted in the error message.
bad argument type: consp <value>
A function requiring a list argument has been passed an argument of incorrect data type with the value noted in the error message. Can be generated by passing any of the c..r functions, foreach, member, nth, or vl-sort-i functions an invalid list argument.
bad argument type: FILE <value>
A function requiring a file descriptor argument has been passed an argument of incorrect data type with the value noted in the error message. Usually a result of passing princ, prin1 or print an invalid second argument.
bad argument type: streamp <value>
A function requiring a file descriptor argument has been passed an argument of incorrect data type with the value noted in the error message. Usually a result of passing the close AutoLISP function a null or invalid argument.
bad argument type: VLA-OBJECT <value>
A function requiring a VLA-Object argument has been passed an argument of incorrect data type with the value noted in the error message.
bad argument type: (or stringp symbolp): <value>
A function requiring either a string or symbol argument has been passed an argument of incorrect data type with the value noted in the error message. Usually a result of passing the getvar or setvar AutoLISP functions an invalid first argument.
bad argument value: string position out of range <index>
Most likely the result of supplying either the vl-string-search or vl-string-position functions a character index which is outside of the range of characters available for the supplied string argument, e.g. (vl-string-search "a" "abc" 4)
bad argument value: non-negative: <value>
A function requiring a positive numerical value has been passed a negative argument. This error is usually a result of passing a negative value as the index parameter for the nth function.
bad ssget mode string
The mode string argument (such as "_X") passed to the ssget function is invalid. See my ssget Function Reference for a list of valid mode string arguments.
bad point argument
The ssget function has been passed an invalid point list argument, or none at all.
bad SSGET list value
One or more items in a filter list supplied to the ssget function is invalid.
Unknown command "example".  Press F1 for help.
The command you are attempting to call is not defined. This could be the result of a LISP program not being loaded, a command not being available in the AutoCAD version you are running, or by including too many 'enter' calls ("") in a command expression.
no function definition: VLAX-GET-ACAD-OBJECT
no function definition: VLAX-ENAME->VLA-OBJECT
The Visual LISP ActiveX(COM) extensions for AutoLISP have not been loaded using the (vl-load-com) function. Add (vl-load-com) to your acaddoc.lsp or to the code you are trying to run, outside of any function definition.
no function definition: <name>
The program is attempting to evaluate a function with name as noted in the error message which is not defined. This could be the result of a missing function definition, or perhaps (vl-load-com) missing from the code.
bad function: <name>
A symbol or variable whose value is not a function is being evaluated as a function. Probable cause is a literal list not being quoted, causing the first item in the list to be evaluated as a function, e.g. (setq lst (1 2 3))
ActiveX Server returned the error: unknown name: <name>
The program is attempting to access a ActiveX Property or Method with the name as noted in the error message which is not available for the supplied VLA-Object.
ActiveX Server returned an error: Invalid index
The program is attempting to use the vlax-safearray->list function to convert an empty safearray to a list.
ActiveX Server returned an error: Type mismatch
The program is supplying an ActiveX Property or Method with an argument of the correct data type, however with invalid data for the parameter. As an example: supplying a Paperspace Viewport to the activeviewport property, or a Modelspace Viewport to the activepviewport property.
Automation Error. Key not found
The program is attempting to use the Item method of a VLA Collection Object to access an item not present in that collection.
vlax-safearray-fill failed.  Invalid initialization list.
The program is attempting to use the vlax-safearray-fill function to populate a safearray with an incorrect number of items.
divide by zero
An divisor function (such as rem or /) is attempting to divide by zero.
function undefined for argument: <value>
A function has been passed an argument of correct data type, but an invalid value for the parameter. Usually caused by a mathematical function being passed an argument for which the operation is not defined, e.g. supplying the sqrt function with a negative argument.

textsize

increase · reset · decrease

Designed & Created by Lee Mac © 2010