OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: mycino on April 14, 2009, 05:43:16 PM

Title: I can't setlist in Listbox....
Post by: mycino on April 14, 2009, 05:43:16 PM
well , firstly i have say HI :)

HI ~~ OpenDcl Maters ~ i live in korean , and i work for GIS and i always use AutoCad Map3D 2008

well, i wanna make something tool for my Job..to good workablity..

so ... i found opendcl tool for it. ..it is really good tool :)

anyway , My point of question is ...how can i put string into Listbox...?

here is my routine..

1. make some pallette form in openstudio...

2. add listbox on pallette form 

3. check event button to  initialize for pallette form 

4.. add source into lisp file...like this :

(defun c:Untitled_Form1_OnInitialize (/)


(dcl_Control_SetList Untitled_Form1_ListBox1 (setq laylist (list "a" "b" "c" "d")))

)

..when i start upper command in autocad , i can't see anything in listbox :(

how can i fix it?

please help me OpenDcl masters~:)



Title: Re: I can't setlist in Listbox....
Post by: owenwengerd on April 14, 2009, 05:50:38 PM
Are you using the latest verion of OpenDCL?  It is working for me in 5.1.0.3.
Title: Re: I can't setlist in Listbox....
Post by: mycino on April 14, 2009, 08:31:32 PM
same version like you 5.1.0.3
bb:(

Title: Re: I can't setlist in Listbox....
Post by: owenwengerd on April 14, 2009, 09:44:23 PM
In that case, check your event handler name to make sure it matches what is in the .odcl file. Otherwise, post the .odcl and .lsp so I can have a look at it.
Title: Re: I can't setlist in Listbox....
Post by: Fred Tomke on April 14, 2009, 11:12:29 PM
Hello,

just a thought:

Code (autolisp) Select


(defun c:myprog (/ lstLayer c:MyProj_MyForm_OnInitialize)
  (dcl_project_load "MyProj")

  (defun c:MyProj_MyForm_OnInitialize (/)
    (dcl_ListBox_Clear MyProj_MyForm_lst_layer)
    (dcl_ListBox_AddList MyProj_MyForm_lst_layer lstLayer)
  ); c:MyProj_MyForm_OnInitialize

  (setq lstLayer (list "a" "b" "c" "d"))
  (dcl_form_show MyProj_MyForm)

  (princ)
); c:myprog


I do this in this way.

Fred
Title: Re: I can't setlist in Listbox....
Post by: mycino on April 15, 2009, 10:03:27 PM
hello :)

thanks for your comments :)

yesterday, finally i rocked it :) thanks for your advised:)

so.. i update my code :) please comments about my code:)
Title: Re: I can't setlist in Listbox....
Post by: Fred Tomke on April 15, 2009, 11:06:58 PM
Seems to be ok!

Fred
Title: Re: I can't setlist in Listbox....
Post by: mycino on April 15, 2009, 11:15:54 PM
thanks you :) FRed :)

Well, What do you work for in Germany?

i work for GIS(Kind of ARc Gis) ..
Title: Re: I can't setlist in Listbox....
Post by: Fred Tomke on April 16, 2009, 06:49:10 AM
Mostly I work on townplanning and landscaping projects (combining CAD and GIS).

Fred