Jump to content

Lisp lệnh MBH trong chủ đề “NHỜ CAO NHÂN GIÚP ĐỠ VẼ PLINE HOẶC RECTANGULAR”

;;; ReAssHatch.lsp requires Hatchutil.lsp which came with Express Tools.
;;; Add boundaries & reassociate them to a selection of Hatch entities.
;;; by: Tom Beauford
;;; [email protected]
;;; LEON COUNTY PUBLIC WORKS ENGINEERING SECTION
(defun c:MBH ( / ss e# ent)
  (setq ss (ssget '((0 . "HATCH")(71 . 0)))
        e# (sslength ss)
  )
  (if(not acet-hatch-remake)(load "Hatchutil"))
  (repeat e#
    (setq e# (- e# 1))
    (acet-hatch-remake (ssname ss e#))
    (entdel (ssname ss e#))
  )
  (princ)
)

Cad 2007 thì thử dùng cái này thử xem.

Cách dùng

  1. Tải tệp 455880_mbh.lsp về máy.
  2. 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ẽ.
  3. Gõ lệnh MBH để chạy lisp.

Mã nguồn 455880_mbh.lsp

;; free lisp from cadviet.com
;;; this lisp was downloaded from https://www.cadviet.com/forum/topic/186560-nh%E1%BB%9D-cao-nh%C3%A2n-gi%C3%BAp-%C4%91%E1%BB%A1-v%E1%BA%BD-pline-ho%E1%BA%B7c-rectangular/
;;; ReAssHatch.lsp requires Hatchutil.lsp which came with Express Tools.
;;; Add boundaries & reassociate them to a selection of Hatch entities.
;;; by: Tom Beauford
;;; [email protected]
;;; LEON COUNTY PUBLIC WORKS ENGINEERING SECTION
(defun c:MBH ( / ss e# ent)
  (setq ss (ssget '((0 . "HATCH")(71 . 0)))
        e# (sslength ss)
  )
  (if(not acet-hatch-remake)(load "Hatchutil"))
  (repeat e#
    (setq e# (- e# 1))
    (acet-hatch-remake (ssname ss e#))
    (entdel (ssname ss e#))
  )
  (princ)
)

Thảo luận gốc

Lisp được chia sẻ trong chủ đề NHỜ CAO NHÂN GIÚP ĐỠ VẼ PLINE HOẶC RECTANGULAR. Xem đúng bài viết #455880 để đọc hướng dẫn và trao đổi thêm.

Về Thư viện AutoLisp (trang 319)