OpenDCL Forums

OpenDCL => Studio/Dialog Editor => Topic started by: Lube on January 22, 2016, 09:42:18 AM

Title: dlc-form-show error
Post by: Lube on January 22, 2016, 09:42:18 AM
Hello guys, I hope this is the right forum for this question..

I've some problem with my add-on.. I've to reload it in order to avoid this error:

(http://i.imgur.com/sR9QZo7.png)

  (dcl-Form-Show cordoli/cordoli 50 300)

Thanks for support!
Title: Re: dlc-form-show error
Post by: Fred Tomke on January 27, 2016, 12:44:37 AM
Hi, Lube, sorry for the late answer.
This error only occurs if your project is not loaded or the name of your form does not match to the variable.
There's no other reason.

Regards, Fred
Title: Re: dlc-form-show error
Post by: Lube on January 29, 2016, 06:30:12 AM
Hello!

Well it's strange..

I have two programs made with OpenDCL in autoload
(http://i.imgur.com/PwNTdSY.png)

And now a video about the problem:
https://knowledge.autodesk.com/community/screencast/6435f1fc-4725-4099-82db-9b9258e5c01f (https://knowledge.autodesk.com/community/screencast/6435f1fc-4725-4099-82db-9b9258e5c01f)

As you can see it works only when i reload it, and when i do that the other one stops working ...
Title: Re: dlc-form-show error
Post by: owenwengerd on January 30, 2016, 02:58:22 PM
I suspect that you have two different projects using the same lisp symbol names, so they are stomping on each other's lisp symbols.
Title: Re: dlc-form-show error
Post by: Lube on February 01, 2016, 12:51:51 AM
Hello! Thanks for your answer.. Can you help me to find the error?

Code (autolisp) Select
(defun load-cordoli (/)

  (load-project nil "cordoli") ;per distribuzione
 
  (dcl-Form-Show cordoli/cordoli 50 300)


  )


and:

Code (autolisp) Select
(defun load-cobiax (/)
  (setvar "CMDECHO" 0)



  (load-project nil "Cobiax") ;per distribuzione
  (dcl-Form-Show Cobiax/Main)

  (vl-cmdf "._undefine" "cancella")
  (vl-cmdf "._undefine" "_delete")

  (vl-cmdf "._undefine" "copia")
  (vl-cmdf "._undefine" "_copy")

  (setvar "CMDECHO" 1)

  )


In must be there, right?
Title: Re: dlc-form-show error
Post by: owenwengerd on February 01, 2016, 05:31:51 AM
Lisp symbol names are defined in the .odcl file by specifying the form or control's (VarName) (http://www.opendcl.com/HelpFiles/index.php?page=Reference/Property/VarName.htm) property.
Title: Re: dlc-form-show error
Post by: Lube on February 01, 2016, 06:23:28 AM
but all the var name are empty.. so it will be <project-key>/<form-name>/<control-name> and the project is diffent ("cobiax" and  "cordoli")

mmh.. maybe i din't get it :(
Title: Re: dlc-form-show error
Post by: Lube on February 08, 2016, 01:34:09 AM
Ok, I fixed it!

The problem was the line "load-project". The function name was the same for two different content!

Thanks :)