PDA

View Full Version : Lisp Error: Negative Index -1


VINIT
12-29-2005, 12:48 AM
Dear All,

If I call the the following code in :after-initialization, the program does load. when I call my program command, it gives me error "Lisp Error: Negative Index -1" for this code. What could be this? or what value am I supposed to pass? Is the syntax correct? Can it be called thru (sd-call-cmds) or via (OLI::) or (Docu::) ??

(docu::AM_GEO_DEFAULT :COLOR :rgb (format nil "~A" (make-gpnt3d :x 0 :y 1 :z 0)))

Regards
Vinit

clausb
12-30-2005, 02:10 PM
In a dialog, AM_GEO_DEFAULT needs to be called through sd-call-cmds.

I'm surprised about the make-gpnt3d call; is the RGB value in AM_GEO_DEFAULT really in gpnt3d format?

When you get "Lisp Error: Negative Index -1", it usually means that you have confused the Lisp subsystem enough so that it cannot even display proper error messages anymore.

HTH,

Claus

VINIT
01-01-2006, 07:32 PM
Dear Claus,
Yes, it is in gpnt3d format. If you try to call AM_GEO_DEFAULT thru docu:: and pass the gpnt3d value to :RGB parameter directly, it says it is not valid value. Specify proper RGB or HSL values. I still havent understood why!

Second point - What are the color CONSTANT values for standard RGB colors (RED, YELLOW, GREEN, CYAN, BLUE, MAGENTA, WHITE). Also I dont know how to call the color dialog lisp function if I were to ask a color from user.

Regards
Vinit

clausb
01-01-2006, 10:42 PM
Second point - What are the color CONSTANT values for standard RGB colors (RED, YELLOW, GREEN, CYAN, BLUE, MAGENTA, WHITE). Also I dont know how to call the color dialog lisp function if I were to ask a color from user.


I haven't tried this myself, but I would guess you could simply use an input variable of type :rgb-color which should provide all the required UI, including access to the color palette. See also the manual on sd-defdialog.

Claus

PS: Happy new year!