Huỳnh Chánh Tổng 3 Báo cáo bài đăng Đã đăng Tháng 9 15, 2018 (princ "\nThi hanh bang lenh 1QM") (defun C:1QM (/ Tenmc dc1 dc2 dc pdao pdap Sdap Sdap1 Sdao Sdao1 tyle fo fname) (setvar "CMDECHO" 0) (if (= fname nil) (setq fname (getfiled "Chon tap tin luu so lieu" "//" "txt" 1)) ) (setq fo (open fname "a")) (princ "Tenmcat DTDao DTDap" fo) (princ "\n" fo) (if (= tylen nil) (progn (setq tylen (getreal "\nTy le ban ve 1/<1000>:")) (if (= tylen nil) (setq tylen 1000.0) ) ) ) (setq tyle (/ (expt tylen 1) 1000000.0)) (setq nhom nil) (setq nhom (car (entsel "\nChon ten mat cat: "))) ;(setq pdao (getpoint "\nChon diem giua dao:")) (while (/= nhom nil) (setq Tenmc (cdr (assoc '1 (entget nhom)))) (setq pdao (getpoint "\nChon diem giua dao:")) (setq Sdao 0) (while (/= pdao nil) (command "layer" "n" "Dao" "c" "magenta" "Dao" "") (command "layer" "s" "Dao" "") (command "bpoly" pdao "") (command "Area" "O" "L") ;(command "erase" "L" "") (setq Sdao1 (getvar "AREA")) (setq Sdao (+ Sdao1 Sdao)) (setq pdao (getpoint "\nCong them dao:")) (if (= pdao nil) (progn (setq Sdao (* Sdao tyle)) (setq Sdao (rtos Sdao 2 2)) ;(command "layer" "s" "Dao" "") ;(setq Sdao (strcat Sdao " m2")) ;(setq dc1 (getpoint "\nChon diem chen:")) ;(command "text" "c" dc1 2.5 0,0 Sdao) ) ) ) ;(setq pS (getpoint "\nChon diem giua:")) (setq dc (getpoint "\nChon diem chen:")) (princ Tenmc fo) (princ " " fo) (princ S fo) (princ "\n" fo) (command "layer" "s" "QM" "") (command "insert" "1QM2" dc "" "" "" Tenmc S) (setq nhom (car (entsel "\nChon ten mat cat: "))) ;(setq pdao (getpoint "\nChon diem giua dao:")) ) (close fo) (princ) (setvar "CMDECHO" 1) ) 1 Chia sẻ bài đăng này Liên kết tới bài đăng Chia sẻ trên các trang web khác