2009-03-17 16:24 UTC
Hello again,
I am trying to get my check boxes to work now and I am getting a "nil value not allowed" when using a getValue command.
I have 4 checkboxes in which 3 are set to 0-unchecked and one is set to 1-checked.
When using an onclicked function I want the one picked to be set to 1 and the others to 0.
(defun c:BillsShopDrawing_form1_CheckBox2_OnClicked (Value /)
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox3))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox3 0))
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox4))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox4 0))
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox1))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox1 0))
(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox2 1)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox1)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox2)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox3)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox4)
)
(defun c:BillsShopDrawing_form1_CheckBox3_OnClicked (Value /)
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox2))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox2 0))
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox4))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox4 0))
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox1))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox1 0))
(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox3 1)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox1)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox2)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox3)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox4)
)
(defun c:BillsShopDrawing_form1_CheckBox4_OnClicked (Value /)
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox3))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox3 0))
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox2))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox2 0))
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox1))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox1 0))
(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox4 1)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox1)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox2)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox3)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox4)
)
(defun c:BillsShopDrawing_form1_CheckBox1_OnClicked (Value /)
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox3))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox3 0))
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox4))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox4 0))
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox2))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox2 0))
(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox1 1)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox1)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox2)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox3)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox4)
)
I thought this would work, but it gives me an error and does not redraw the checkboxes with the new value.
Thanks for any input,
Bill
I am trying to get my check boxes to work now and I am getting a "nil value not allowed" when using a getValue command.
I have 4 checkboxes in which 3 are set to 0-unchecked and one is set to 1-checked.
When using an onclicked function I want the one picked to be set to 1 and the others to 0.
(defun c:BillsShopDrawing_form1_CheckBox2_OnClicked (Value /)
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox3))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox3 0))
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox4))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox4 0))
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox1))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox1 0))
(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox2 1)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox1)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox2)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox3)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox4)
)
(defun c:BillsShopDrawing_form1_CheckBox3_OnClicked (Value /)
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox2))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox2 0))
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox4))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox4 0))
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox1))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox1 0))
(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox3 1)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox1)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox2)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox3)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox4)
)
(defun c:BillsShopDrawing_form1_CheckBox4_OnClicked (Value /)
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox3))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox3 0))
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox2))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox2 0))
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox1))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox1 0))
(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox4 1)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox1)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox2)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox3)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox4)
)
(defun c:BillsShopDrawing_form1_CheckBox1_OnClicked (Value /)
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox3))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox3 0))
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox4))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox4 0))
(if (= 1 (dcl_Control_GetValue BillsShopDrawing_form1_CheckBox2))(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox2 0))
(dcl_Control_SetValue BillsShopDrawing_form1_CheckBox1 1)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox1)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox2)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox3)
(dcl_Control_Redraw BillsShopDrawing_form1_CheckBox4)
)
I thought this would work, but it gives me an error and does not redraw the checkboxes with the new value.
Thanks for any input,
Bill