(defun Check_for_TT_P (/) (progn (if (= (tblsearch "style" "TT_style") 'nil) (entmakex '( (0 . "STYLE") (100 . "AcDbSymbolTableRecord") (100 . "AcDbTextStyleTableRecord") (2 . "TT_style") (70 . 0) (40 . 0.0) (41 . 1.0) (50 . 0.0) (71 . 0) (42 . 2.0) (3 . "Times New Roman.ttf") (4 . "") ) ) ) (if (tblsearch "block" "TT_P") (princ) (progn (entmake '((0 . "BLOCK") (100 . "AcDbEntity") (67 . 0) (8 . "0") (100 . "AcDbBlockReference") (66 . 1) (2 . "TT_P") (10 0 0 0) (70 . 2))) (entmake '((0 . "CIRCLE") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbCircle") (10 0 0 0) (40 . 0.2))) (entmake '((0 . "ATTDEF") (100 . "AcDbEntity") (67 . 0) (8 . "TT_NOMER") (100 . "AcDbText") (10 1.200949140349962 0.4 0) (40 . 1.6) (1 . "") (50 . 0) (41 . 1) (51 . 0) (7 . "TT_style") (71 . 0) (72 . 0) (11 1.200949140349962 2.4 0) (100 . "AcDbAttributeDefinition") (280 . 0) (3 . "Nomer") (2 . "NOMER") (70 . 0) (73 . 0) (74 . 3) (280 . 0))) (entmake '((0 . "ATTDEF") (100 . "AcDbEntity") (67 . 0) (8 . "TT_KOTA") (100 . "AcDbText") (10 1.200949140349962 -2.0 0) (40 . 1.6) (1 . "") (50 . 0) (41 . 1) (51 . 0) (7 . "TT_style") (71 . 0) (72 . 0) (11 1.200949140349962 0.0 0) (100 . "AcDbAttributeDefinition") (280 . 0) (3 . "KOTA") (2 . "KOTA") (70 . 0) (73 . 0) (74 . 3) (280 . 0))) (entmake '((0 . "ATTDEF") (100 . "AcDbEntity") (67 . 0) (8 . "TT_KOTA") (100 . "AcDbText") (10 10.87217454063124 -0.947849610037641 0) (40 . 1.6) (1 . "") (50 . 0) (41 . 1) (51 . 0) (7 . "TT_style") (71 . 0) (72 . 0) (11 10.87217454063124 1.052150389962359 0) (100 . "AcDbAttributeDefinition") (280 . 0) (3 . "DESC") (2 . "DESC") (70 . 1) (73 . 0) (74 . 3) (280 . 1))) (entmake '((0 . "ENDBLK") (100 . "AcDbBlockEnd") (8 . "0"))) (princ) ) ) (if (tblsearch "block" "TT_PT") (princ) (progn (entmake '((0 . "BLOCK") (100 . "AcDbEntity") (67 . 0) (8 . "0") (100 . "AcDbBlockReference") (66 . 1) (2 . "TT_PT") (10 0.0 0.0 0.0) (70 . 2))) (entmake '((0 . "CIRCLE") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbCircle") (10 0.0 0.0 0.0) (40 . 0.7))) (entmake '((0 . "CIRCLE") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbCircle") (10 0.0 0.0 0.0) (40 . 0.525))) (entmake '((0 . "CIRCLE") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbCircle") (10 0.0 0.0 0.0) (40 . 0.07))) (entmake '((0 . "CIRCLE") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbCircle") (10 0.0 0.0 0.0) (40 . 0.035))) (entmake '((0 . "CIRCLE") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbCircle") (10 0.0 0.0 0.0) (40 . 0.042))) (entmake '((0 . "CIRCLE") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbCircle") (10 0.0 0.0 0.0) (40 . 0.049))) (entmake '((0 . "CIRCLE") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbCircle") (10 0.0 0.0 0.0) (40 . 0.056))) (entmake '((0 . "CIRCLE") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbCircle") (10 0.0 0.0 0.0) (40 . 0.063))) (entmake '((0 . "LWPOLYLINE") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbPolyline") (90 . 2) (70 . 128) (43 . 0.0) (38 . 0.0) (39 . 0.0) (10 0.0 -0.7) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0) (10 0.0 -0.525) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0))) (entmake '((0 . "LWPOLYLINE") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbPolyline") (90 . 2) (70 . 128) (43 . 0.0) (38 . 0.0) (39 . 0.0) (10 0.0 0.525) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0) (10 0.0 0.7) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0))) (entmake '((0 . "ARC") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbCircle") (10 0.000000000016861 0.0 0.0) (40 . 0.6769) (100 . "AcDbArc") (50 . 1.570796326818983) (51 . 4.712388980360603))) (entmake '((0 . "ARC") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbCircle") (10 0.000000000016861 0.0 0.0) (40 . 0.5383) (100 . "AcDbArc") (50 . 1.570796326818983) (51 . 4.712388980360603))) (entmake '((0 . "ARC") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbCircle") (10 0.000000000016861 0.0 0.0) (40 . 0.5614) (100 . "AcDbArc") (50 . 1.570796326818983) (51 . 4.712388980360603))) (entmake '((0 . "ARC") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbCircle") (10 0.000000000016861 0.0 0.0) (40 . 0.5845) (100 . "AcDbArc") (50 . 1.570796326818983) (51 . 4.712388980360603))) (entmake '((0 . "ARC") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbCircle") (10 0.000000000016861 0.0 0.0) (40 . 0.6076) (100 . "AcDbArc") (50 . 1.570796326818983) (51 . 4.712388980360603))) (entmake '((0 . "ARC") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbCircle") (10 0.000000000016861 0.0 0.0) (40 . 0.6307) (100 . "AcDbArc") (50 . 1.570796326818983) (51 . 4.712388980360603))) (entmake '((0 . "ARC") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbCircle") (10 0.000000000016861 0.0 0.0) (40 . 0.6538) (100 . "AcDbArc") (50 . 1.570796326818983) (51 . 4.712388980360603))) (entmake '((0 . "LWPOLYLINE") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbPolyline") (90 . 2) (70 . 128) (43 . 0.0) (38 . 0.0) (39 . 0.0) (10 1.132571537455078 0.0) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0) (10 8.428731937368866 0.0) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0))) (entmake '((0 . "ATTDEF") (100 . "AcDbEntity") (67 . 0) (8 . "TT_Nomer_PT") (100 . "AcDbText") (10 1.200949140349962 1 0.0) (40 . 1.8) (1 . "") (50 . 0.0) (41 . 1.0) (51 . 0.0) (7 . "TT_style") (71 . 0) (72 . 0) (11 1.200949140349962 2 0.0) (100 . "AcDbAttributeDefinition") (280 . 0) (3 . "Nomer") (2 . "NOMER") (70 . 0) (73 . 0) (74 . 3) (280 . 0))) (entmake '((0 . "ATTDEF") (100 . "AcDbEntity") (67 . 0) (8 . "TT_KOTA") (100 . "AcDbText") (10 1.200949140349962 -1.594007840240374 0.0) (40 . 1.8) (1 . "") (50 . 0.0) (41 . 1.0) (51 . 0.0) (7 . "TT_style") (71 . 0) (72 . 0) (11 1.200949140349962 -0.194007840240374 0.0) (100 . "AcDbAttributeDefinition") (280 . 0) (3 . "KOTA") (2 . "KOTA") (70 . 0) (73 . 0) (74 . 3) (280 . 0))) (entmake '((0 . "ATTDEF") (100 . "AcDbEntity") (67 . 0) (8 . "TT_KOTA") (100 . "AcDbText") (10 10.87217454063124 -0.347849610037641 0.0) (40 . 1.8) (1 . "") (50 . 0.0) (41 . 1.0) (51 . 0.0) (7 . "TT_style") (71 . 0) (72 . 0) (11 10.87217454063124 1.052150389962359 0.0) (100 . "AcDbAttributeDefinition") (280 . 0) (3 . "DESC") (2 . "DESC") (70 . 1) (73 . 0) (74 . 3) (280 . 1))) (entmake '((0 . "ENDBLK") (100 . "AcDbBlockEnd") (8 . "0"))) (princ) ) ) (if (tblsearch "block" "TT_TT") (princ) (progn (entmake '((0 . "BLOCK") (100 . "AcDbEntity") (67 . 0) (8 . "0") (100 . "AcDbBlockReference") (66 . 1) (2 . "TT_TT") (10 0.0 0.0 0.0) (70 . 2))) (entmake '((0 . "CIRCLE") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbCircle") (10 0.0 0.0 0.0) (40 . 0.07))) (entmake '((0 . "CIRCLE") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbCircle") (10 0.0 0.0 0.0) (40 . 0.035))) (entmake '((0 . "CIRCLE") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbCircle") (10 0.0 0.0 0.0) (40 . 0.042))) (entmake '((0 . "CIRCLE") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbCircle") (10 0.0 0.0 0.0) (40 . 0.049))) (entmake '((0 . "CIRCLE") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbCircle") (10 0.0 0.0 0.0) (40 . 0.056))) (entmake '((0 . "CIRCLE") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbCircle") (10 0.0 0.0 0.0) (40 . 0.063))) (entmake '((0 . "LWPOLYLINE") (100 . "AcDbEntity") (67 . 0) (8 . "insert_TT") (100 . "AcDbPolyline") (90 . 2) (70 . 128) (43 . 0.0) (38 . 0.0) (39 . 0.0) (10 1.132571537455078 0.0) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0) (10 8.428731937368866 0.0) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0))) (entmake '((0 . "LWPOLYLINE") (100 . "AcDbEntity") (67 . 0) (8 . "Terrain") (100 . "AcDbPolyline") (90 . 3) (70 . 129) (43 . 0.0) (38 . 0.0) (39 . 0.0) (10 0. 1.0) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0) (10 -0.866025403784439 -0.5) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0) (10 0.866025403784439 -0.500000000000001) (40 . 0.0) (41 . 0.0) (42 . 0.0) (91 . 0))) (entmake '((0 . "ATTDEF") (100 . "AcDbEntity") (67 . 0) (8 . "TT_Nomer_PT") (100 . "AcDbText") (10 1.200949140349962 1 0.0) (40 . 1.8) (1 . "") (50 . 0.0) (41 . 1.0) (51 . 0.0) (7 . "TT_style") (71 . 0) (72 . 0) (11 1.200949140349962 2 0.0) (100 . "AcDbAttributeDefinition") (280 . 0) (3 . "Nomer") (2 . "NOMER") (70 . 0) (73 . 0) (74 . 3) (280 . 0))) (entmake '((0 . "ATTDEF") (100 . "AcDbEntity") (67 . 0) (8 . "TT_KOTA") (100 . "AcDbText") (10 1.200949140349962 -1.594007840240374 0.0) (40 . 1.8) (1 . "") (50 . 0.0) (41 . 1.0) (51 . 0.0) (7 . "TT_style") (71 . 0) (72 . 0) (11 1.200949140349962 -0.194007840240374 0.0) (100 . "AcDbAttributeDefinition") (280 . 0) (3 . "KOTA") (2 . "KOTA") (70 . 0) (73 . 0) (74 . 3) (280 . 0))) (entmake '((0 . "ATTDEF") (100 . "AcDbEntity") (67 . 0) (8 . "TT_KOTA") (100 . "AcDbText") (10 8.741424319139914 -0.347849610037641 0.0) (40 . 1.8) (1 . "") (50 . 0.0) (41 . 1.0) (51 . 0.0) (7 . "TT_style") (71 . 0) (72 . 0) (11 8.741424319139914 1.052150389962359 0.0) (100 . "AcDbAttributeDefinition") (280 . 0) (3 . "DESC") (2 . "DESC") (70 . 1) (73 . 0) (74 . 3) (280 . 1))) (entmake '((0 . "ENDBLK") (100 . "AcDbBlockEnd") (8 . "0"))) (princ) ) ) ) (princ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun insD (X Y nam scal listt / block) (vl-load-com) (setq block (vla-InsertBlock (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object) ) ) (vlax-3D-point Y X) nam scal scal scal 0 ) ) (mapcar '(lambda (j k) (vla-put-textstring k (eval j)) ) listt (vlax-invoke block 'GetAttributes) ) (princ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;rlx lisps (defun _Exit2 () (setq *error* old-err)(term_dialog) (if dialog-fp (progn (close dialog-fp)(setq dialog-fp nil))) (if dialog-dcl (unload_dialog dialog-dcl)) (if (and dialog-fn-kpt (findfile dialog-fn-kpt))(vl-file-delete dialog-fn-kpt)) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;rlx lisps (defun tabbenize (l) (apply 'strcat (cdr (apply 'append (mapcar '(lambda (x) (list "\t" x)) l))))) (defun update_TTs_list ( / ) (start_list "lb_TTs_list")(mapcar 'add_list (mapcar 'tabbenize listc2))(end_list) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun T:spaceremover (lst / ttr ttr2) (setq ttr (subst 32 47 (subst 32 44 (subst 32 9 (vl-string->list lst))))) (repeat (length ttr) (if (and (= (car ttr) 32) (= (cadr ttr) 32)) (princ) (setq ttr2 (cons (car ttr) ttr2))) (setq ttr (cdr ttr)) ) (vl-string-trim " " (vl-list->string (reverse ttr2))) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun numtxt (str) (vl-every '(lambda (x) (<= 46 x 57)) (vl-string->list str))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;rlx lisps (defun Write_Dialog_kpt ( / ) (if (and (setq dialog-fn-kpt (vl-filename-mktemp "kptin.dcl")) (setq dialog-fp (open dialog-fn-kpt "w"))) (mapcar '(lambda (x)(write-line x dialog-fp)) (list "kpt_in_dialog : dialog {label=\"Insert point by coordinates)\";" ":boxed_column {label=\"Coordinates\";" ": row {" "tabs=\"10 20 40\";" " : text { label = \"�\";}" " : text { label = \"X\";} : text { label = \"Y\";} : text { label = \"Z\";} : text { label = \"D\";}} : column {" ": list_box {key=\"lb_TTs_list\";width=60;height=15;allow_accept=true;tabs=\"0 15 30 50 65\";multiple_select=false;} : row { : text { label = \"Nuber of points:\";key = \"br\";} : button { label = \"Delete record\";key = \"del\"; width=5; fixed_width = true;} : button { label = \"Add record\";key = \"add\"; width=5; fixed_width = true;}} : image {key = \"progbar\"; fixed_width = 50; height = 1;}}}" " : boxed_column {" " : boxed_row { label = \"������ .kpt ��� .txt ���� � Coordinates � X Y Z, D - ��� ���\";" ": button {key = \"brow\"; width=5; fixed_width = true; label = \"Browse...\";}" ": edit_box {key = \"fil1\";width=65; fixed_width = true;}}" ": boxed_column {spacer;" ": edit_box {key = \"scal\";label = \"Scale --> \";width=55;edit_width = 25;fixed_width = true;alignment = left;}" ": edit_box {key = \"cif1\"; label = \"Significant nubers --> \";width=55;edit_width = 25;fixed_width = true;alignment = left;}}}" "ok_cancel_help;}" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; "edit_dialog2 : dialog {width=30;label=\"Properties\";" ":boxed_row {label=\"Data editor\";" ":column {fixed_width=true;width=0;" ":text {label=\"�\";}:text {label=\"� [m]\";}:text {label=\"Y [m]\";}:text {label=\"Z [m]\";}:text {label=\"Desc.\";}}" ":column {:edit_box {key=\"nom1\";width=15; fixed_width = true;} :edit_box {key=\"coordx1\";width=15; fixed_width = true;} :edit_box {key=\"coordy1\";width=15; fixed_width = true;} :edit_box {key=\"coordz1\";width=15; fixed_width = true;} :edit_box {key=\"desc1\";width=15; fixed_width = true;}}}" "ok_cancel;}" ) ) ) (if dialog-fp (close dialog-fp))(gc) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun Start_kpt_in_dialog ( / drv dialog-fn-kpt dialog-dcl dialog-fp) (if (null dialog-fn-kpt)(Write_Dialog_kpt)) (if (and (setq dialog-dcl (load_dialog dialog-fn-kpt)) (new_dialog "kpt_in_dialog" dialog-dcl)) (progn (Check_for_TT_P) (Activate_kpt_in_dialog) (setq drv (start_dialog)) (cond ((= drv 0)(princ)); ��� ����� "cancel" ((= drv 1)(alert "ok")); ��� ����� OK ) ) ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun Activate_kpt_in_dialog ( / Tbr) (mapcar '(lambda (x)(action_tile (car x) (cadr x))) '(("cancel" "(done_dialog 0)") ("accept" "(Insert)(done_dialog 1)") ;;; rest of the buttons ("fil1" "(ClickedOnAddButton)") ("brow" "(Browse)(Update_kpt_in_dialog)") ("scal" "(setq scal2 $value)(scall)") ("cif1" "(setq cif2 $value)(ciff)") ("del" "(T:delete)") ("add" "(zeroed)(Start_edit_kptin_dialog)") ("help" "(t:help)") ) ) (set_tile "scal" "1000") (set_tile "cif1" "3") ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun Start_edit_kptin_dialog ( / drv dialog-fn-kpt dialog-dcl dialog-fp) (if (null dialog-fn-kpt)(Write_Dialog_kpt)) (if (and (setq dialog-dcl (load_dialog dialog-fn-kpt)) (new_dialog "edit_dialog2" dialog-dcl)) (progn (Active_edit_kptin_dialog) (setq drv (start_dialog)) (cond ((= drv 0)(princ)); ��� ����� "cancel" ((= drv 1)(alert "ok")); ��� ����� OK ) ) ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun Active_edit_kptin_dialog ( / Tbr) (mapcar '(lambda (x)(action_tile (car x) (cadr x))) '(("cancel" "(done_dialog 0)") ("accept" "(OKK)") ;;; rest of the buttons ("nom1" "(nom)") ("coordx1" "(coordxx $value)") ("coordy1" "(coordyy $value)") ("coordz1" "(coordzz $value)") ("desc1" "(desc $value)") ) ) ) (defun Update_kpt_in_dialog () (update_TTs_list)) (defun scall () (if (equal (numtxt scal2) 'T) (setq scal1 (/ (atof scal2) 1000)) (progn (set_tile "scal" "1000")(alert "������ �������� ����� - ������"))) ) (defun ciff () (if (and (equal (numtxt cif2) 'T) (<= 0 (atof cif2) 10)) (setq cif3 cif2) (progn (set_tile "cif1" "3")(alert "����� �� ����� ���� �� ��� 2-3 �����"))) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun nom (/) (if (equal (get_tile "nom1") "") (alert "������ ���� ��...") (setq nomm (get_tile "nom1"))) nomm) (defun coordxx (coordx /) (if (and (or (equal coordx2 "") (equal coordx2 'nil)) (or (equal coordx "") (equal coordx 'nil))) (alert "������ X" ) (progn (if (equal (numtxt coordx) 'T) (setq coordx2 coordx)(progn (alert "Integer ...") (set_tile "coordx1" "")))))coordx2) (defun coordyy (coordy /) (if (or (equal coordy "") (equal coordy 'nil)) (alert "������ Y" ) (progn (if (equal (numtxt coordy) 'T) (setq coordy2 coordy)(progn (alert "Integer ...") (set_tile "coordy1" ""))))) coordy2) (defun coordzz (coordz /) (if (or (equal coordz "") (equal coordz 'nil)) (setq coordz2 "miss H")(progn (if (equal (numtxt coordz) 'T) (setq coordz2 coordz)(progn (alert "Integer ...") (set_tile "coordz1" ""))))) coordz2) (defun desc (descc /) (if (or (equal descc 'nil) (equal (get_tile "desc1") "")) (setq descc2 "miss D") (setq descc2 descc))) (defun OKK () (nom) (setq aa (coordxx (get_tile "coordx1"))) (setq bb (coordyy (get_tile "coordy1"))) (setq cc (coordzz (get_tile "coordz1"))) (if coordz2 (princ) (setq coordz2 "miss H")) (if descc2 (princ) (setq descc2 "miss D")) (if (/= nomm 'nil) (if aa (if bb (if cc (if descc2 (setq add1 (list nomm coordx2 coordy2 coordz2 descc2)) (progn (setq descc2 "miss D") (setq add1 nil))) (setq coordz2 "miss H")) (setq add1 nil)) (setq add1 nil)) (nom)) (if (= add1 'nil) (princ) (progn (setq listc2 (append listc2 (list add1))) (done_dialog 2) (start_list "lb_TTs_list")(mapcar 'add_list (mapcar 'tabbenize listc2))(end_list) (set_tile "br" (strcat "Nuber of points: " (rtos (length listc2) 2 0))) ) ;(done_dialog 2) ) (setq coordz2 nil coordx2 nil coordy2 nil nomm nil descc nil add1 nil descc2 nil) ) (defun zeroed () (setq coordz2 nil coordx2 nil coordy2 nil nomm nil descc nil add1 nil descc2 nil) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun c:PointIN ( / listc2 listc) (setq dzin (getvar 'dimzin)) (setvar 'dimzin 1) (_Exit2) (setvar 'cmdecho 0) (setq coordz2 nil coordx2 nil coordy2 nil nomm nil descc nil add1 nil descc2 nil) ;(vl-cmdf "purge" "all" "*" "N") (purge "TT_PT") (purge "TT_P") (purge "TT_TT") (setvar 'cmdecho 1) (setq st (getvar 'textstyle)) (setq listc2 nil) (Start_kpt_in_dialog) (_Exit2) (setvar 'textstyle st) (setvar 'dimzin dzin) (princ) ) ;from Internet (defun purge (bNme) (and (tblsearch "BLOCK" bNme) (setvar "CMDECHO" 0) (vl-cmdf "_.-purge" "_b" bNme "_n") (setvar "CMDECHO" 1) (not (tblsearch "BLOCK" bNme)))) (defun Browse ( / lst kpt lst2) (vl-load-com) (setq listc2 nil) (setq sl (getfiled "������ kpt ����" (getvar "dwgprefix") "txt;kpt;*" 16 );getfiled ) (if sl (progn (setq kp (open sl "r")) (while (setq kpt (read-line kp)) ;(setq kpt (strcat "(" kpt ")")) (setq lst (cons kpt lst)) ) (setq lst (reverse lst)) (setq llcoord '()) (repeat (length lst) (setq lst2 nil) (setq str (T:spaceremover (car lst))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq i 0 n (strlen " ")) (while (setq j (vl-string-search " " str i)) (setq lst2 (cons (substr str (1+ i)(- j i)) lst2) i (+ j n) ) ) (setq lst2 (reverse (cons (substr str (1+ i)) lst2))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq listc (cons (append lst2 llcoord) listc)) (setq lst (cdr lst)) ) (setq listc (reverse listc)) (mode_tile "fil1" 1)(set_tile "fil1" (strcat sl)) (foreach x listc (if (and (>= (length x) 3) (equal (numtxt (nth 1 x)) 'T)(equal (numtxt (nth 2 x)) 'T)) (if (and (nth 3 x) (nth 4 x)) (setq listc2 (cons x listc2)) (if (nth 3 x) (setq listc2 (cons (append x (list "miss D")) listc2)) (setq listc2 (cons (append x (list "miss H" "miss D")) listc2)))))) (setq listc2 (reverse listc2)) (set_tile "br" (strcat "Nuber of points: " (rtos (length listc2) 2 0))) )) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun Insert () (if listc2 (progn (setvar 'textstyle "TT_style") (setvar 'clayer "insert_TT") (setq fillx (dimx_tile "progbar")) (setq filly (dimy_tile "progbar")) (fill_image 0 0 fillx filly -15) (end_image) (if scal2 (princ) (setq scal1 1)) (if cif2 (princ) (setq cif3 "3")) (setq numb 0) (setq allnum (length listc2)) (mapcar '(lambda (x) (progn (insD (atof (nth 1 x)) (atof (nth 2 x)) (if (wcmatch (strcase (nth 0 x)) "PT*") "TT_PT" (if (wcmatch (strcase (nth 0 x)) "TT*") "TT_TT" "TT_P")) scal1 (list (strcat (strcase (nth 0 x))) (if (equal (nth 3 x) "miss H") "" (if (equal (numtxt (nth 3 x)) 'T) (if (equal (atof (nth 3 x)) 0) "" (rtos (atof (nth 3 x)) 2 (atoi cif3))))) (if (equal (nth 4 x) "miss D") "" (strcat (nth 4 x))))) (progn (start_image "progbar")(fill_image 0 0 (/ (* numb fillx) allnum) filly 5)(end_image) (setq numb (1+ numb))(set_tile "progbar" (strcat " "(rtos (/(* numb 100) allnum) 2 2)))))) listc2) (setq scal2 nil cif2 nil) (princ) ) ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun LM:RemoveNth ( n l / i ); Lee mac lisp (setq i -1) (vl-remove-if '(lambda ( x ) (= (setq i (1+ i)) n)) l) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun T:delete (/ listc3 dell) (setq dell (get_tile "lb_TTs_list")) (setq listc2 (LM:RemoveNth (atof dell) listc2)) (start_list "lb_TTs_list")(mapcar 'add_list (mapcar 'tabbenize listc2))(end_list) (set_tile "br" (strcat "Nuber of points: " (rtos (length listc2) 2 0))) ) (defun t:help () (alert "Creator")) (vl-load-com) (princ)