Đặt chiều cao text, mtext và chỉnh Linetype scale ?
840244 chú ý quy định về đặt yêu cầu ở box nhé!
Đặt Linetype:
(defun C:test ( / ss d); (grtext -1 "Free Lisp from Cadviet @Ketxu") (cond ( (and (setq ss (ssget (list (cons 0 "*LINE,ARC,CIRCLE")))) (setq d (getreal "\nLineType Scale :")) (vl-load-com) (setq ss (vla-get-ActiveSelectionSet (vla-get-ActiveDocument (vlax-get-acad-object)))) ) (vlax-for obj ss (vla-put-LinetypeScale obj d)) ) ((princ "\nError!")) ) (princ) )
Thanks anh KETXU nhìu nhé !
- Tải lisp
- 183601_test.lsp
Cách dùng
- Tải tệp 183601_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 183601_test.lsp
;; free lisp from cadviet.com
;;; this lisp was downloaded from https://www.cadviet.com/forum/topic/60254-y%C3%AAu-c%E1%BA%A7u-%C4%91%E1%BA%B7t-chi%E1%BB%81u-cao-text-mtext-v%C3%A0-ch%E1%BB%89nh-linetype-scale/
(defun C:test ( / ss d);
(grtext -1 "Free Lisp from Cadviet @Ketxu")
(cond ( (and (setq ss (ssget (list (cons 0 "*LINE,ARC,CIRCLE"))))
(setq d (getreal "\nLineType Scale :"))
(vl-load-com)
(setq ss (vla-get-ActiveSelectionSet (vla-get-ActiveDocument (vlax-get-acad-object))))
)
(vlax-for obj ss (vla-put-LinetypeScale obj d))
)
((princ "\nError!"))
)
(princ)
)
Thảo luận gốc
Lisp được chia sẻ trong chủ đề [Yêu cầu] Đặt chiều cao text, mtext và chỉnh Linetype scale ?. Xem đúng bài viết #183601 để đọc hướng dẫn và trao đổi thêm.