复制到命令行回车加载,命令jsk可以解锁,命令sdk可以加锁
(defun c:jsk (
/
stm e stlx r_zm70 c_zm71 r_dist_zm44 c_dist_zm45
)
(setvar "cmdecho" 0)
(setq stm (car (entsel1 "\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 100"acdbblockreference") (list 100"acdbminsertblock") e))
(entmake e)
(entdel stm)
(princ "\n操作成功!")
)
)
(setq stm (car (entsel1 "\n请选择要解除锁定(无法炸开)的加密图块:")))
)
(setvar "cmdecho" 1)
(prin1)
)
;;--------------------------------------------------------------------
;;转换“普通块”为“多重插入块”
(defun c:sdk (
/
stm e stlx r_zm70 c_zm71
)
(setvar "cmdecho" 0)
(setq stm (car (entsel1 "\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 e (subst (cons 70 1) r_zm70 e))
(setq e (subst (cons 71 1) c_zm71 e))
(setq e (subst (list 100"acdbminsertblock") (list 100"acdbblockreference") e))
(entmake e)
(entdel stm)
(princ "\n操作成功!")
)
)
(setq stm (car (entsel1 "\n请选择要锁定(无法炸开)的普通块:")))
)
(setvar "cmdecho" 1)
(prin1)
)
我不是复制流
但是我仍然不懂你说的什么意思
快捷键X 炸开的命令