2008-09-09 11:19 UTC
I am having problems with the following code as it seems to only toggle graphicbutton1.
Is it just me being thick, or is it a bug?
Cheers
Scott
Using version 1.0.0.24
Acad 2006
Is it just me being thick, or is it a bug?
Cheers
Scott
Using version 1.0.0.24
Acad 2006
(defun c:nlc ()
(dcl_Project_Load "Nortec_Layer_Control" T)
(dcl_Form_Show Nortec_Layer_Control_Form1)
(princ)
)
(defun c:Nortec_Layer_Control_Form1_GraphicButton1_OnClicked (/) ; Basement
(if (= (dcl_Control_GetBackColor Nortec_Layer_Control_Form1_GraphicButton1) -256)
(progn ; FREEZE Basement
(dcl_Control_SetBackColor
Nortec_Layer_Control_Form1_GraphicButton1
855551
)
(command "layer" "Freeze" "*basement*" "")
)
(progn ; THAW Basement
(dcl_Control_SetBackColor
Nortec_Layer_Control_Form1_GraphicButton1
65280
)
(command "layer" "thaw" "*basement*" "")
)
)
)
(defun c:Nortec_Layer_Control_Form1_GraphicButton2_OnClicked (/) ;Ground
(if (= (dcl_Control_GetBackColor Nortec_Layer_Control_Form1_GraphicButton2) -256)
(progn ; FREEZE Ground
(dcl_Control_SetBackColor
Nortec_Layer_Control_Form1_GraphicButton2
855551
)
(command "layer" "Freeze" "*ground*" "")
)
(progn ; THAW Ground
(dcl_Control_SetBackColor
Nortec_Layer_Control_Form1_GraphicButton2
65280
)
(command "layer" "thaw" "*ground*" "")
)
)
)
(defun c:Nortec_Layer_Control_Form1_GraphicButton3_OnClicked (/) ;First
(if (= (dcl_Control_GetBackColor Nortec_Layer_Control_Form1_GraphicButton3) -256)
(progn ; FREEZE First
(dcl_Control_SetBackColor
Nortec_Layer_Control_Form1_GraphicButton3
855551
)
(command "layer" "Freeze" "*First*" "")
)
(progn ; THAW First
(dcl_Control_SetBackColor
Nortec_Layer_Control_Form1_GraphicButton3
65280
)
(command "layer" "thaw" "*First*" "")
)
)
)
(defun c:Nortec_Layer_Control_Form1_GraphicButton4_OnClicked (/) ;Second
(if (= (dcl_Control_GetBackColor Nortec_Layer_Control_Form1_GraphicButton4) -256)
(progn ; FREEZE Second
(dcl_Control_SetBackColor
Nortec_Layer_Control_Form1_GraphicButton4
855551
)
(command "layer" "Freeze" "*Second*" "")
)
(progn ; THAW Second
(dcl_Control_SetBackColor
Nortec_Layer_Control_Form1_GraphicButton4
65280
)
(command "layer" "thaw" "*second*" "")
)
)
)