Tải đoạn mã sau
;; free lisp from cadviet.com ;;; this lisp was downloaded from http://www.cadviet.com/forum/topic/69746-nho-viet-lisp-loc-cac-doi-tuong-la-text-trong-mot-vung-kin-xuat-ra-excel/ ;========LISP OUTPUT TEXT BEN TRONG PLINE========== ;=============KANGKUNG 28/03/2013================== (defun C:KK() (setq taphop (ssget '((0 . "TEXT")))) (if (not Path) (setq Path(getvar "dwgprefix"))) (setq file(getfiled "Output File" Path "csv" 11) Path file) (setq file_out(open file "W")) (setq index 0) (while (< index (sslength taphop)) (setq TEXT (entget (ssname taphop index))) (if (= (+ (cdr(assoc 72 TEXT)) (cdr(assoc 73 TEXT))) 0) (setq InsertPoint(cdr(assoc 10 TEXT))) (setq InsertPoint(cdr(assoc 11 TEXT))) ) (setq String(cdr(assoc 1 TEXT))) (write-line (strcat (rtos (+ index 1) 2 0) "," (rtos (car InsertPoint) 2 3) "," (rtos (cadr InsertPoint) 2 3) "," (rtos (caddr InsertPoint) 2 3) "," String) file_out) (setq index (+ index 1)) ) (close file_out) (alert "Well done!") ) (princ "\n Written By KangKung - 28/03/2013\n") (princ "\n Nhap KK de chay chuong trinh\n") (princ "\n Chinh sua boi AJS - www.lisp.vn\n")
---------------------------------------------------------------------------------------------
Mọi thông tin xin liên hệ Fanpage AutoLISP Thật là đơn giản!
Cảm ơn bạn đã theo dõi!
Không có nhận xét nào:
Đăng nhận xét