LISP Xuất file 3d thành 2d
Ko biết bạn có viết dc cái lisp chua hay là dùng Crip! Mình thử add các command vào thành cái lisp này mong là có thể giúp bạn nhanh hơn làm thủ công! 
(defun c:xu(/ dt)
(command "Mspace")
(setq dt (car(entsel)))
(command "-view" "o" "F")
(command "zoom" "o" dt "")
(command "SOLPROF" dt "" "y" "y" "n")
(entdel(entlast))
;;;;;;
(command "-view" "o" "r")
(command "rotate" (entlast) "" "0,0,0" "-90")
(command "SOLPROF" dt "" "y" "y" "n")
(entdel(entlast))
;;;;;;
(command "-view" "o" "F")
(command "rotate" (entlast) "" "0,0,0" "90")
;;;;;;
(command "Ucs" "W")
(command "plan" "")
(command "SOLPROF" dt "" "y" "y" "n")
(entdel(entlast))
(command "Pspace")
)
(defun c:xu(/ dt)
(command "Mspace")
(setq dt (car(entsel)))
(command "-view" "o" "F")
(command "zoom" "o" dt "")
(command "SOLPROF" dt "" "y" "y" "n")
(entdel(entlast))
;;;;;;
(command "-view" "o" "r")
(command "rotate" (entlast) "" "0,0,0" "-90")
(command "SOLPROF" dt "" "y" "y" "n")
(entdel(entlast))
;;;;;;
(command "-view" "o" "F")
(command "rotate" (entlast) "" "0,0,0" "90")
;;;;;;
(command "Ucs" "W")
(command "plan" "")
(command "SOLPROF" dt "" "y" "y" "n")
(entdel(entlast))
(command "Pspace")
)
- Tải lisp
- 181769_xu.lsp
Cách dùng
- Tải tệp 181769_xu.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 XU để chạy lisp.
Mã nguồn 181769_xu.lsp
;; free lisp from cadviet.com
;;; this lisp was downloaded from https://www.cadviet.com/forum/topic/59188-y%E1%BB%81u-c%E1%BA%A7u-lisp-xu%E1%BA%A5t-file-3d-th%C3%A0nh-2d/
(defun c:xu(/ dt)
(command "Mspace")
(setq dt (car(entsel)))
(command "-view" "o" "F")
(command "zoom" "o" dt "")
(command "SOLPROF" dt "" "y" "y" "n")
(entdel(entlast))
;;;;;;
(command "-view" "o" "r")
(command "rotate" (entlast) "" "0,0,0" "-90")
(command "SOLPROF" dt "" "y" "y" "n")
(entdel(entlast))
;;;;;;
(command "-view" "o" "F")
(command "rotate" (entlast) "" "0,0,0" "90")
;;;;;;
(command "Ucs" "W")
(command "plan" "")
(command "SOLPROF" dt "" "y" "y" "n")
(entdel(entlast))
(command "Pspace")
)
Thảo luận gốc
Lisp được chia sẻ trong chủ đề [YỀU CẦU] LISP Xuất file 3d thành 2d. Xem đúng bài viết #181769 để đọc hướng dẫn và trao đổi thêm.