2011-10-06 15:13 UTC
I have a Lisp routine that uses the Onclicked control. When I run it I get the message "invlaid autocad command...nil". I have see n the other posts that say to set the invoke to Asynchronous. I have done that for all of the DCL entities (form, option list, text box). I am on Version 6.0.2 of OpenDcl. Here is the code. What do I need to change??
(defun c:ElevationDescriptions_Form1_TextButton1_OnClicked (/)
(setq SelectDes (dcl_Control_GetCurrentSelection ElevationDescriptions_Form1_OptionList1))
(setq BlkDes (cond ((= Selectdes 0) "FS")
((= Selectdes 1) "FL")
((= Selectdes 2) "TC")
((= Selectdes 3) "FL,HP")
((= Selectdes 4) "LP")
((= Selectdes 5) "HP")
((= Selectdes 6) "FG,GB")
)
)
(setq e2 (car (entsel "\nSelect Elevation to change: ")))
(setq e2 Esel)
(setq a (entnext (car e2)))
(setq b (entnext a))
(command "-attedit" "y" "" "" "" (entnext b) "v" "r" Blkdes "")
)
(defun c:ElevationDescriptions_Form1_TextButton1_OnClicked (/)
(setq SelectDes (dcl_Control_GetCurrentSelection ElevationDescriptions_Form1_OptionList1))
(setq BlkDes (cond ((= Selectdes 0) "FS")
((= Selectdes 1) "FL")
((= Selectdes 2) "TC")
((= Selectdes 3) "FL,HP")
((= Selectdes 4) "LP")
((= Selectdes 5) "HP")
((= Selectdes 6) "FG,GB")
)
)
(setq e2 (car (entsel "\nSelect Elevation to change: ")))
(setq e2 Esel)
(setq a (entnext (car e2)))
(setq b (entnext a))
(command "-attedit" "y" "" "" "" (entnext b) "v" "r" Blkdes "")
)