将以下内容保存为lsp文件(如exm.lsp),加载后运行exm即可实现将“多重插入块”转换为“普通块”,并能够使用explode命令进行分解操作。(DEFUN C:exm () (SETQ cmdecho 0) (SETQ STM (car (ENTSEL "n点取多重块"))) (while STM (setq e (entget STM)) (setq stlx (cdr (assoc 0 e))) (if (= stlx "INSERT") (PROGN (setq r_zm70 (assoc 70 e)) (setq c_zm71 (assoc 71 e)) (setq r_dist_zm44 (assoc 44 e)) (setq c_dist_zm45 (assoc 45 e)) (setq e (subst (cons 44 0) r_dist_zm44 e)) (setq e (subst (cons 45 0) c_dist_zm45 e)) (setq e (subst (cons 70 0) r_zm70 e)) (setq e (subst (cons 71 0) c_zm71 e)) (setq e (subst (list "AcDbBlockReference") (list "AcDbMInsertBlock") e)) (entmake e) (entdel STM))(SETQ STM (car (ENTSEL "n点取下一多重块"))) (SETQ cmdecho 1)
Copyright © 2025 IZhiDa.com All Rights Reserved.
知答 版权所有 粤ICP备2023042255号