Lisp lệnh TEST trong chủ đề “DIMORDINATE CHO ĐƯỜNG TRÒN”
Dim dưới và phải.
(defun c:test ( / CENT ENT P1 P1A P2 P2A RAD) (setq ent (entget (car (entsel)))) (setq cent (acet-dxf 10 ent) rad (acet-dxf 40 ent) p1 (polar cent 0 rad) p1a (polar cent 0 ( * rad 1.2)) p2 (polar cent (* pi 1.5) rad) p2a (polar cent (* pi 1.5) ( * rad 1.2)) ) (command "dimordinate" p1 p1a) (command "dimordinate" p2 p2a) )
- Tải lisp
- 462396_test.lsp
Cách dùng
- Tải tệp 462396_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 462396_test.lsp
;; free lisp from cadviet.com
;;; this lisp was downloaded from https://www.cadviet.com/forum/topic/191284-dimordinate-cho-%C4%91%C6%B0%E1%BB%9Dng-tr%C3%B2n/
(defun c:test ( / CENT ENT P1 P1A P2 P2A RAD)
(setq ent (entget (car (entsel))))
(setq cent (acet-dxf 10 ent)
rad (acet-dxf 40 ent)
p1 (polar cent 0 rad)
p1a (polar cent 0 ( * rad 1.2))
p2 (polar cent (* pi 1.5) rad)
p2a (polar cent (* pi 1.5) ( * rad 1.2))
)
(command "dimordinate" p1 p1a)
(command "dimordinate" p2 p2a)
)Thảo luận gốc
Lisp được chia sẻ trong chủ đề DIMORDINATE CHO ĐƯỜNG TRÒN. Xem đúng bài viết #462396 để đọc hướng dẫn và trao đổi thêm.