NIL Value not allowed?

Started by mfreiet, March 31, 2022, 10:27:52 AM

Previous topic - Next topic

mfreiet

I came across Open DCL while trying to get a legacy AutoCAD add-in from a defunct company to work in a modern build of ACAD before the last supported version times out of licensing, and have gotten (I think) all of the functionality working in ACAD 22, but I always get 2-4 popups of the following error on opening AutoCAD with the AddIn enabled in the startup suite:

An OpenDCL function argument processing exception has occurred! 
Error: NIL value not allowed
Function: dcl-Control-SetCaption
Argument:0

I've got no idea if this is something coming from the add-in, or a bug/setting in OpenDCL, but am hoping someone can point me in a useful direction. If it means the users who want that add-in just have to click a few extra popups once a day, we can suffer that, but I'd love to clear it if possible.

I'd love to be able to roll up to ACAD23, but didn't have the time to test out the current OpenDCL build with it yet, and I suspected it might not until an update came out so wasn't worrying about that yet, is that something that might roll out imminently, or that the current build should still work on? 

honkinberry

It's a bug in your Lisp code.

You have a line of code along the lines of:
(dcl-Control-SetCaption project/form/control1 "caption")

Argument 0 means it's the first argument, so the `project/form/control1`.

From the studio editor, you can go to the control browser for the control, and copy the SetCaption code, which will show you the correct syntax.

--J

mfreiet

Excellent, thanks, I think that's enough for me to figure out what I'm looking for. 

It's only been a decade or so since I wrote anything in LISP, what can possibly go wrong ;)  I'll report back.