dlc-form-show error

Started by Lube, January 22, 2016, 09:42:18 AM

Previous topic - Next topic

Lube

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:



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

Thanks for support!

Fred Tomke

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
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Lube

Hello!

Well it's strange..

I have two programs made with OpenDCL in autoload


And now a video about the problem:
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 ...

owenwengerd

I suspect that you have two different projects using the same lisp symbol names, so they are stomping on each other's lisp symbols.
Owen Wengerd (Outside The Box) / ManuSoft

Lube

#4
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?

owenwengerd

Lisp symbol names are defined in the .odcl file by specifying the form or control's (VarName) property.
Owen Wengerd (Outside The Box) / ManuSoft

Lube

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 :(

Lube

Ok, I fixed it!

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

Thanks :)