rdhhb 发表于 2012-10-17 21:19:46

保护版权,将图加密成多重定义块,批量实现

实现代码:

(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的微博

kwok 发表于 2012-10-17 21:53:04

加密,那解呢?

ㄘ丶转裑ㄧ灬 发表于 2012-10-18 09:41:10

(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))

rdhhb 发表于 2013-12-28 10:48:22

楼上替我回答了。

paulpipi 发表于 2020-9-30 07:14:36

正需要,谢谢

sunny_8848 发表于 2020-9-30 08:05:27

可以加密,解密不成功,2010版

专用车研发 发表于 2023-4-20 12:01:00

不行啊,插入块然后勾选分解,原始图纸又回来了
页: [1]
查看完整版本: 保护版权,将图加密成多重定义块,批量实现