在CAD中遇到多重插入塊(嵌套塊)使用“炸開”命令無法分解時,可使用lsp插件進行分解(親測可用)。
下圖為多重插入塊。文章源自四五設(shè)計網(wǎng)-http://www.wasochina.com/51126.html
文章源自四五設(shè)計網(wǎng)-http://www.wasochina.com/51126.html
多重插入塊文章源自四五設(shè)計網(wǎng)-http://www.wasochina.com/51126.html
1、先創(chuàng)建lsp插件。文章源自四五設(shè)計網(wǎng)-http://www.wasochina.com/51126.html
新建一個文本文檔,名稱和擴展名修改為unlk.lsp,保存。文章源自四五設(shè)計網(wǎng)-http://www.wasochina.com/51126.html
文本文檔里復制以下代碼然后保存。文章源自四五設(shè)計網(wǎng)-http://www.wasochina.com/51126.html
(defun c:unlk (/ en ent) (setq en (entsel "\n請選擇被加密的圖形:")) (if en (if (= (cdr (assoc 0 (setq ent (cdr (entget (setq en (car en))))))) "INSERT" ) (progn (setq ent (entmakex (list '(0 . "INSERT") (assoc 2 ent) (assoc 10 ent) ) ) ) (command "_.explode" (entlast)) (entdel en) ) ) ) (princ "\nOK,解密成功。") (princ) )
文章源自四五設(shè)計網(wǎng)-http://www.wasochina.com/51126.html
注意:在txt中復制完代碼后,點擊另存為,另存為按鈕左邊編碼選擇“ANSI”,之后再另存。文章源自四五設(shè)計網(wǎng)-http://www.wasochina.com/51126.html
文章源自四五設(shè)計網(wǎng)-http://www.wasochina.com/51126.html
另存時,編碼選擇“ANSI”。文章源自四五設(shè)計網(wǎng)-http://www.wasochina.com/51126.html
2、在cad中加載插件。
點擊工具→加載應用程序→選擇剛才保存的unlk.lsp文件→加載→關(guān)閉
顯示已加載成功
3、使用插件分解塊。
在命令行輸入“ unlk” 分解多重插入塊,如果有多重嵌套塊可多次使用命令,然后用X命令炸開,塊已經(jīng)被分解。
圖形已被分解


評論