When the value of 'eit' is anything above '0' I want to create the insulation entities. [within the (progn....)]
If 'eit' is zero I want to skip this step and go to (INS_MB)
The following code does not work & I can't see my error(s)
Code: Select all
(defun DRAW_INS ()
;----------
; Draw Insulation recangle
(cond (/= eit 0)
(progn
(command "_Rectangle";
(strcat (rtos EIXOO#) "," (rtos EIYOO#) ",0" )
(strcat "@" (rtos eitx#) "," (rtos eity#) ",0" ) "")
(command "_fillet" "R" eit# "")
(command "_fillet" "P" "L" "")
(setq ENTZ1 (entlast))
;Extrude Insulation Shell
(command "_extrude" ENTZ1 "" dis "")
(setq ENTZ3 (entlast))
(command "_extrude" ENTZ2 "" dis "")
(setq ENTZ4 (entlast))
(command "_subtract" ENTZ3 "" ENTZ4 "")
(setq ENTZ5 (entlast))
(command "_change" ENTZ5 "" "P" "la" "Insulation" "")
(ssadd ENTZ5 SS) ; ADD TO SELECTION SET
);end progn
);END COND
(INS_MB)
) ;end DRAW_INS