Lisp bẻ và nối đối tượng
Break 2 đường tại vị trí giao nhau
(defun c:test ( / ss ent1 ent2 inter)(setq ss (ssget))
(setq ent1 (ssname ss 0)
ent2 (ssname ss 1))
(setq inter (vla-intersectwith
(vlax-ename->vla-object ent1)
(vlax-ename->vla-object ent2) acExtendBoth)
inter (safearray-value (variant-value inter)))
(command "break" ent1 inter inter)
(command "break" ent2 inter inter)
)
SAO LOAD RỒI BẤM LỆNH TEST HOK ĐƯỢC XIN CHỈ GIÁO
- Tải lisp
- 418138_test.lsp
Cách dùng
- Tải tệp 418138_test.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 TEST để chạy lisp.
Mã nguồn 418138_test.lsp
;; free lisp from cadviet.com
;;; this lisp was downloaded from https://www.cadviet.com/forum/topic/48184-%C4%91%C3%A3-xong-lisp-b%E1%BA%BB-v%C3%A0-n%E1%BB%91i-%C4%91%E1%BB%91i-t%C6%B0%E1%BB%A3ng/
(defun c:test ( / ss ent1 ent2 inter)Thảo luận gốc
Lisp được chia sẻ trong chủ đề [Đã xong] Lisp bẻ và nối đối tượng. Xem đúng bài viết #418138 để đọc hướng dẫn và trao đổi thêm.