?Needle or Cannula Depth. A number of insertion depths that allow the needle or cannula to be used on a variety of fatty tissue levels are available. Two or three depths are available and a doctor can provide guidance on which one to use.
Lisp BRD theo như yêu cầu của bạn :
Khi chạy, Lisp yêu cầu :
1. Chọn Dimension
2. Chọn Các điểm nằm trên Dim Line,
PS :Code trên cũng chưa thật hoàn chỉnh lắm.
Tệp .lsp gốc không còn trên máy chủ. Hãy chép mã nguồn bên dưới (lấy từ bài viết gốc) vào một tệp văn bản, lưu với đuôi .lsp.
Cách dùng
- Chép mã nguồn, lưu thành tệp 185145_brd.lsp.
- 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 BRD để chạy lisp.
Mã nguồn 185145_brd.lsp (trích từ bài viết gốc)
(defun c:brd(/ e Lst Lst_dim d13dim i d13 d14 oldos)
(setq e (car(entsel "\n Pick chon dimension"))
d13 (cdr(assoc 13 (entget e))) d14 (cdr(assoc 14 (entget e)))
)
(while (setq p (getpoint "\n Chon cac diem tren Dim can break :"))
(if (car(nentselp p)) (setq Lst (append Lst (list p))))
)
(setq dgtr (vlax-curve-getClosestPointTo (car(nentselp (car Lst))) d13) i -1)
(setq oldos (getvar "osmode"))
(setvar "osmode" 0)
(Repeat (length Lst)
(command "copy" e "" dgtr (nth (setq i (1+ i)) Lst))
(setq Lst_dim (append Lst_dim (list (entlast))))
)
(setq Lst_dim (append (list e) Lst_dim ))
(setq i 0)
(Repeat (length Lst_dim)
(setq edim (nth i Lst_dim))
(if (equal edim (last Lst_dim))
(setq d13dim d14)
(setq d13dim (cdr(assoc 13 (entget (nth (1+ i) Lst_dim)))))
)
(setq edim (subst (cons 14 d13dim) (assoc 14 (entget edim)) (entget edim)))
(entmod edim)
(setq i (1+ i))
)
(setvar "osmode" oldos)
)Thảo luận gốc
Lisp được chia sẻ trong chủ đề [Yêu cầu] Nhờ viết lisp phân chia và sát nhập dim?. Xem đúng bài viết #185145 để đọc hướng dẫn và trao đổi thêm.