保护版权,将图加密成多重定义块,批量实现
实现代码:(defun c:jiam (/ aa)
(alert "\n加密前要备份原有图文件!!")
(setq aa (getvar "DWGNAME"))
(vl-cmdf "_.minsert" aa "1000,1000,0" "1" "1" 0 5 5 0 0)
(alert "\n加密成功,请删除原有图后用pu命令清空图层、线型等数据!!")
)
http://bbs.mjtd.com/xwb/images/bgimg/icon_logo.png 该贴已经同步到 rdhhb的微博 加密,那解呢? (DEFUN C:exm ()
(setvar "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 100"AcDbBlockReference") (list 100"AcDbMInsertBlock") e))
(entmake e)
(entdel stm)
))
(SETQ STM (car (ENTSEL "\n点取下一多重块")))
)
(setvar "cmdecho" 1))
楼上替我回答了。 正需要,谢谢 可以加密,解密不成功,2010版 不行啊,插入块然后勾选分解,原始图纸又回来了
页:
[1]