OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: jp4ul on October 09, 2009, 11:34:10 AM

Title: dcl_Form_Show Error
Post by: jp4ul on October 09, 2009, 11:34:10 AM
Short time reader, first time poster.

Downloaded studio, V 6.0.0.7 and installed.

Playing around with some forms and I get an error stating "NIL value not allowed" from function "dcl_Form_show," with argument "0."

I've looked through the control browser and it says dcl_Form_Show can use one parameter.

So obviously, my question is, what am I missing?

I do have AutoCAD 2008 and 2010 installed.  That might be causing a problem.  I know it's caused a problem with my dictionary, which I haven't looked into yet.

Suggestions?

Thanks.

Jim
Title: Re: dcl_Form_Show Error
Post by: eptownie1988 on October 09, 2009, 12:18:05 PM
You might be missing the line of code highlighted in yellow:

(defun C:Program Name ()
  (dcl_Project_Load "DCL File Name" T)
  (dcl_Form_Show Name of the form)
)
Title: Re: dcl_Form_Show Error
Post by: jp4ul on October 09, 2009, 01:35:28 PM
I do have that.  Below is the code.  I stole it from the tutorial but the only difference is the form name and the program name.

(command "OPENDCL")

(defun c:pd ()

  (dcl_Project_Load "makepanel" T)

  (dcl_Form_Show IntroForm)

  (princ)
)

Title: Re: dcl_Form_Show Error
Post by: eptownie1988 on October 09, 2009, 01:54:20 PM
Try making your line of code this:

(dcl_Form_Show makepanel_IntroForm)
Title: Re: dcl_Form_Show Error
Post by: jp4ul on October 09, 2009, 02:12:39 PM
That was it.

Thanks.

It never occurred to me to add the project name in front of the form name.  Looking at the tutorial, I thought that's what they just called it.


Thanks again.

Jim
Title: Re: dcl_Form_Show Error
Post by: eptownie1988 on October 09, 2009, 05:03:58 PM
Jim:

I am glad I could help.  Good luck and just be warned that it is addicting.  I find myself in front of the computer for hours at a time when I get into a program.  OpenDCL is a great tool and I see alot of possibilities and uses for it.

Lester
Title: Re: dcl_Form_Show Error
Post by: owenwengerd on October 10, 2009, 07:59:44 AM
For what it's worth, if you open the control browser (double click on a control -- or in this case the form) and select the function (in this case "Show"), it will show you the correct syntax, including the correct lisp symbol to use based on the current values in the project.