Lisp lệnh CPY trong chủ đề “Lisp copy nhanh đối tượng theo nhiều khoảng cách”
nizagara medicine ajax “I really don’t feel like we ever really played at a high level,” Nash said. “Yeah, we won at a high level, but i don’t think we ever did feel comfortable or confident out there. We were winning games and scrapping and fighting and turning around, but we never found that commonality. We never found that confidence as a team.”
- Tải lisp
- 302174_cpy.lsp
Cách dùng
- Tải tệp 302174_cpy.lsp về máy.
- Trong AutoCAD gõ lệnh APPLOAD, chọn tệp vừa tải rồi bấm Load. Cũng có thể kéo thả tệp .lsp vào cửa sổ bản vẽ.
- Gõ lệnh CPY để chạy lisp.
Mã nguồn 302174_cpy.lsp
;; free lisp from cadviet.com
;;; this lisp was downloaded from https://www.cadviet.com/forum/topic/103579-lisp-copy-nhanh-%C4%91%E1%BB%91i-t%C6%B0%E1%BB%A3ng-theo-nhi%E1%BB%81u-kho%E1%BA%A3ng-c%C3%A1ch/
(defun c:cpy(/ ss pt hg os el en kc)
(prompt "\nChon cac doi tuong de copy:")
(setq ss (ssget)
pt (getpoint "\nDiem goc:")
hg (getangle pt "\nTheo huong:")
tt t
os (getvar 'osmode))
(setvar 'osmode 0)
(while tt
(setq kc (getstring (strcat "\nKhoang cach <"
(rtos (if (not kcach) (setq kcach 1) kcach)) " / nhan Z de ket thuc>:")))
(cond ((and (/= kc "") (/= (strcase kc) "Z")) (setq kcach (atof kc)))
((= (strcase kc) "Z") (setq tt nil)))
(if tt
(progn
(setq el (entlast))
(command "copy" ss "" pt (polar pt hg kcach))
(setq ss (ssadd))
(while (setq en (entnext el))
(ssadd en ss)
(setq el en))
) )
)
(command "select" ss "")
(setvar 'osmode os) (princ)
)
Thảo luận gốc
Lisp được chia sẻ trong chủ đề Lisp copy nhanh đối tượng theo nhiều khoảng cách. Xem đúng bài viết #302174 để đọc hướng dẫn và trao đổi thêm.