2009-07-17 13:31 UTC
Basically, I've made this little program and when OpenDCL calls the function:
(defun c:LayZer_Dia_AddButton_OnClicked (/)
(LayZer_addLayers (dcl_ListBox_GetSelectedItems LayZer_Dia_Layerlist))
(princ)
)
It produces the error: Command: ; error: invalid AutoCAD command: nil
Yet, when I run (LayZer_addLayers (dcl_ListBox_GetSelectedItems LayZer_Dia_Layerlist)) at the command prompt, the function completes successfully.
I added a prompt statement into the onclicked function to see if it was even being called and yes, it is. For some reason OpenDCL just doesn't like calling my function when it's called from another (tried putting that statement in the closebutton_onclicked function, same error). I've looked at my layzer_addlayers function and made sure there are no errors; made sure the layzerlayerdata list is full before it runs...don't know what to do here. Everything should run fine but it doesn't.
Attached is everything you'll need to reproduce the error (hopefully). Thanks in advance for any help.
(defun c:LayZer_Dia_AddButton_OnClicked (/)
(LayZer_addLayers (dcl_ListBox_GetSelectedItems LayZer_Dia_Layerlist))
(princ)
)
It produces the error: Command: ; error: invalid AutoCAD command: nil
Yet, when I run (LayZer_addLayers (dcl_ListBox_GetSelectedItems LayZer_Dia_Layerlist)) at the command prompt, the function completes successfully.
I added a prompt statement into the onclicked function to see if it was even being called and yes, it is. For some reason OpenDCL just doesn't like calling my function when it's called from another (tried putting that statement in the closebutton_onclicked function, same error). I've looked at my layzer_addlayers function and made sure there are no errors; made sure the layzerlayerdata list is full before it runs...don't know what to do here. Everything should run fine but it doesn't.
Attached is everything you'll need to reproduce the error (hopefully). Thanks in advance for any help.