145
590
446
中流砥柱
;//////////////////////////////////////////////////////////////////////////;; Start-Up Function;(defun C:ESS (/ SUCE SUOM SUSM SUAB SUAD SUCL SUCR) (setq SUCE (getvar "cmdecho")) (setq SUOM (getvar "orthomode")) (setq SUSM (getvar "osmode")) (setq SUAB (getvar "angbase")) (setq SUAD (getvar "angdir")) (setq SUCL (getvar "clayer")) (setq SUCR (getvar "cecolor")) (ESS_MF) (princ));;//////////////////////////////////////////////////////////////////////////;; Main Function;(defun ESS_MF (/ SIZE$ SIZE MIDPT PLEN PT01 PT02 a b COLR SUCE SUOM SUSM SUAB SUAD SUCL SUCR) (setq temperr *error*) (setq *error* ESS_ETRAP)(entmake (list (cons 0 "STYLE") (cons 100 "AcDbSymbolTableRecord") (cons 100 "AcDbTextStyleTableRecord") (cons 2 "CCC_Services") (cons 3 "Verdana.ttf") (cons 40 0) (cons 70 0) )) (setq S1_list '( "1500mm" "1350mm" "1200mm" "1050mm" "900mm" "750mm" "675mm" "600mm" "525mm" "450mm" "375mm" "300mm" "225mm" "150mm")) (setq dcl_id (load_dialog "ESS.dcl")) (if (not (new_dialog "ESS" dcl_id) ) (progn (ALERT "Can not find your dcl file") (exit) ) ) (start_list "S1") (mapcar 'add_list S1_list) (end_list) (if SIZE:DEF (set_tile "S1" (itoa SIZE:DEF)) ) (action_tile "cancel" "(done_dialog)(setq userclick nil)" ) (action_tile "accept" (strcat "(progn (setq S:IZE (atoi (get_tile "S1")) SIZE:DEF S:IZE)" "(done_dialog)(setq userclick T))" ) ) (start_dialog) (unload_dialog dcl_id) (if userclick (ESS_VARIABLE) ) (princ));;//////////////////////////////////////////////////////////////////////////;; ESS_VARIABLE Function;(defun ESS_VARIABLE () (progn (setq SIZE$ (fix S:IZE)) (setq SIZE$ (nth S:IZE S1_list)) (cond ((= SIZE$ "1500mm")(setq SIZE$ "Existing_Drainage_Storm_Sewer_Concrete_E1500")(setq LTYP "E1500")) ((= SIZE$ "1350mm")(setq SIZE$ "Existing_Drainage_Storm_Sewer_Concrete_E1350")(setq LTYP "E1500")) ((= SIZE$ "1200mm")(setq SIZE$ "Existing_Drainage_Storm_Sewer_Concrete_E1200")(setq LTYP "E1500")) ((= SIZE$ "1050mm")(setq SIZE$ "Existing_Drainage_Storm_Sewer_Concrete_E1050")(setq LTYP "E1500")) ((= SIZE$ "900mm")(setq SIZE$ "Existing_Drainage_Storm_Sewer_Concrete_E900")(setq LTYP "E1500")) ((= SIZE$ "750mm")(setq SIZE$ "Existing_Drainage_Storm_Sewer_Concrete_E750")(setq LTYP "E1500")) ((= SIZE$ "675mm")(setq SIZE$ "Existing_Drainage_Storm_Sewer_Concrete_E675")(setq LTYP "E1500")) ((= SIZE$ "600mm")(setq SIZE$ "Existing_Drainage_Storm_Sewer_Concrete_E600")(setq LTYP "E1500")) ((= SIZE$ "525mm")(setq SIZE$ "Existing_Drainage_Storm_Sewer_Concrete_E525")(setq LTYP "E1500")) ((= SIZE$ "450mm")(setq SIZE$ "Existing_Drainage_Storm_Sewer_Concrete_E450")(setq LTYP "E1500")) ((= SIZE$ "375mm")(setq SIZE$ "Existing_Drainage_Storm_Sewer_Concrete_E375")(setq LTYP "E1500")) ((= SIZE$ "300mm")(setq SIZE$ "Existing_Drainage_Storm_Sewer_Concrete_E300")(setq LTYP "E1500")) ((= SIZE$ "225mm")(setq SIZE$ "Existing_Drainage_Storm_Sewer_Concrete_E225")(setq LTYP "E1500")) ((= SIZE$ "150mm")(setq SIZE$ "Existing_Drainage_Storm_Sewer_Concrete_E150")(setq LTYP "E1500")) ) ) (setq SIZE SIZE$) (ESS_OUTPUT) (princ));;//////////////////////////////////////////////////////////////////////////;; ESS_OUTPUT Function;(defun ESS_OUTPUT () (setq a (strcat "CCC_DR_"LTYP) b (strcat "CCC_SERVICES_"SIZE) ) (if (not (tblsearch "LTYPE" a) ) (command "_.-linetype" "_l" a "CCC_Drainage_Existing Storm.lin" "") ) (command "_.-layer" "_N" b "_M" b "_L" a b "_C" "84" b "_LW" "0.3" b "" ) (command "_-color" "bylayer")