53
302
249
后起之秀
samp11 : dialog { //dialog name label = "Pipe Lines" ; //give it a label : row { //define row :boxed_column { //define radio column label = "Pipe diameters used (mm)" ; //give it a label : toggle { //define toggle key = "tog1" ; //give it a name label = "150" ; //give it a label } : toggle { //define toggle key = "tog2" ; //give it a name label = "200" ; //give it a label } : toggle { //define toggle key = "tog3" ; //give it a name label = "225" ; //give it a label } : toggle { //define toggle key = "tog4" ; //give it a name label = "250" ; //give it a label } : toggle { //define toggle key = "tog5" ; //give it a name label = "300" ; //give it a label } : toggle { //define toggle key = "tog6" ; //give it a name label = "375" ; //give it a label } : toggle { //define toggle key = "tog7" ; //give it a name label = "450" ; //give it a label } : toggle { //define toggle key = "tog8" ; //give it a name label = "600" ; //give it a label } } //end toggle collumn : boxed_column { //define boxed column label = "Variables" ; : edit_box { //edit box key = "eb1" ; label = "Manning 'n'" ; edit_width = 10 ; } : edit_box { //edit box key = "eb2" ; label = "% part full" ; edit_width = 10 ; } } //end boxed collumn } ok_cancel ; //predifined OK/Cancel //end text(defun c:samp14 ( / bit cnt dch rtn lst ) (setq lst '( ((150.0 120.0) (150.0 110.0) (150.0 100.0)) ((200.0 150.0) (200.0 140.0) (200.0 120.0)) ((225.0 180.0) (225.0 170.0) (225.0 160.0) (225.0 150.0)) ((250.0 200.0) (250.0 180.0) (225.0 170.0) (225.0 160.0)) ((300.0 300.0) (300.0 280.0) (300.0 260.0) (300.0 250.0) (300.0 240.0) (300.0 220.0) (300.0 200.0) (300.0 180.0)) ((375.0 350.0) (375.0 320.0) (375.0 300.0) (375.0 280.0)) ((450.0 400.0) (450.0 370.0) (450.0 350.0) (450.0 320.0)) ((600.0 500.0) (600.0 450.0) (600.0 420.0) (600.0 400.0)) ) ) (if (<= (setq dch (load_dialog "samp11.dcl")) 0) (princ "\nsamp11.dcl not found or could not be loaded.") ) (if (not (new_dialog "samp11" dch)) (princ "\nError in samp11.dcl file.") ) (my_init_dialog) (setq bit 1 cnt 1 rtn 0) (repeat (length lst) (action_tile (strcat "tog" (itoa cnt)) (strcat "(setq rtn (boole (+ 4 (* 3 (atoi $value))) " (itoa bit) " rtn))") ) (setq bit (lsh bit 1) cnt (1+ cnt)) ) (if (= 1 (start_dialog)) (setq bit 1 lst (vl-remove-if '(lambda ( x / flg ) (setq flg (zerop (logand bit rtn)) bit (lsh bit 1)) flg) lst