dcl_Form_Show Error

Started by jp4ul, October 09, 2009, 11:34:10 AM

Previous topic - Next topic

jp4ul

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

eptownie1988

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)
)

jp4ul

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)
)


eptownie1988

Try making your line of code this:

(dcl_Form_Show makepanel_IntroForm)

jp4ul

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

eptownie1988

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

owenwengerd

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.
Owen Wengerd (Outside The Box) / ManuSoft