!写字符、汉字的源码程序!
本帖最后由 尘缘一生 于 2014-11-6 17:59 编辑自己写的,一直使用,想完善它,也为自己干活快些,请这里高手完善下吧。
说明:
我里面构建命令为:
XZP:写出水平向字符的。
XZC:写出垂直向字符的。
XHZ:写字符、汉字综合的,包括水平、垂直、选择直线,设置字体等。
SUAN-XZ:先写字--->选择一线性实体,即可写出与线性角度适合的实体,在移动定位。
特点:1:字符等可以任意组合,鼠标点即可,也可以键盘输入新内容。本人极其恶心用键盘,
追求最少击键,省一秒也不多一秒。因此,构建了几个命令,可以整合一个综合的。
2:跟随鼠标,任意满足放置要求。
3:这是93年写的,LISP简单,代码初级,自己只为干活快,都是被逼的。
遗憾:我是做结构的,一直弄不好钢筋问题,组合也设置不好,DCL的LABLE 项又找不到钢筋怎么写,
就用了汉字“一级钢",”二级钢“。。。成了这个样子。 感觉这玩意实在块不到哪里去啊 命令: SUAN-XZ
; 错误: no function definition: ENTS 源码如下:;;----------------------------------------------------------------------------
(defun ENTS( )
(setq pt1 (entsel "\nplease choose an entity:"))
(setq pt2 (nth 1 pt1))
(setq pt3 (nth 0 pt1))
(setq k3 (osnap pt2 "NEAR"))
(setq pt4 (osnap k3 "ENDPOINT"))
(setq pt5 (osnap k3 "MIDPOINT"))
(setq dis (distance pt4 pt5))
(setq ang (angle pt4 pt5))
(setq pt6 (polar pt4 ang (* 2 dis)))
(setq k1 (nth 0 pt4))
(setq k2 (nth 0 pt6))
(if (< k1 k2)
(setq ang (angle pt4 pt6))
)
(if (< k2 k1)
(setq ang (angle pt6 pt4))
)
(if (= k2 k1)
(setq ang (/ pi 2))
)
)
;;-----------------------------------------------------------------
(defun DCLXZ( )
(if (or (not dcl_id) (< (setq dcl_id(load_dialog (dcl-xz-dcl))) 0))
(setq dcl_id(load_dialog (dcl-xz-dcl))))
(if (not (new_dialog "dhxz" dcl_id))(exit))
(action_tile "tile0" "(setq pt1 $value)(setq s pt1)(setq n (strlen pt1))")
(action_tile "tile1" "(setq pt1 \"1\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile2" "(setq pt1 \"2\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile3" "(setq pt1 \"3\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile4" "(setq pt1 \"4\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile5" "(setq pt1 \"5\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile6" "(setq pt1 \"6\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile7" "(setq pt1 \"7\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile8" "(setq pt1 \"8\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile9" "(setq pt1 \"9\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile10" "(setq pt1 \"0\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile11" "(setq pt1 (chr 128))(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile12" "(setq pt1 \"%\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile13" "(setq pt1 \"=\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile14" "(setq pt1 \"%%130\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile15" "(setq pt1 \"%%131\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile48" "(setq pt1 \"%%132\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile16" "(setq pt1 \"@\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile17" "(setq pt1 \";\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile18" "(setq pt1 \",\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile19" "(setq pt1 \":\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile20" "(setq pt1 \"(\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile21" "(setq pt1 \")\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile22" "(setq pt1 \"+\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile23" "(setq pt1 \"-\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile24" "(setq pt1 \".\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile25" "(setq pt1 \">\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile26" "(setq pt1 (strcat (chr 128) \"0.000\"))(setq s (strcat s pt1))(setq n (+ n 6))(set_tile \"tile0\" s)")
(action_tile "tile27" "(setq pt1 \"@100\")(setq s (strcat s pt1))(setq n (+ n 2))(set_tile \"tile0\" s)")
(action_tile "tile28" "(setq pt1 \"@120\")(setq s (strcat s pt1))(setq n (+ n 4))(set_tile \"tile0\" s)")
(action_tile "tile29" "(setq pt1 \"@150\")(setq s (strcat s pt1))(setq n (+ n 2))(set_tile \"tile0\" s)")
(action_tile "tile30" "(setq pt1 \"@200\")(setq s (strcat s pt1))(setq n (+ n 2))(set_tile \"tile0\" s)")
(action_tile "tile31" "(setq pt1 \"@250\")(setq s (strcat s pt1))(setq n (+ n 2))(set_tile \"tile0\" s)")
(action_tile "tile32" "(setq pt1 \"<\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile33" "(setq pt1 \"*\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile34" "(setq pt1 \"[\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile35" "(setq pt1 \"]\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile36" "(setq pt1 \"a\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile37" "(setq pt1 \"#\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile38" "(setq pt1 \"JQL\")(setq s (strcat s pt1))(setq n (+ n 3))(set_tile \"tile0\" s)")
(action_tile "tile39" "(setq pt1 \"YP\")(setq s (strcat s pt1))(setq n (+ n 2))(set_tile \"tile0\" s)")
(action_tile "tile40" "(setq pt1 \"XB\")(setq s (strcat s pt1))(setq n (+ n 2))(set_tile \"tile0\" s)")
(action_tile "tile41" "(setq pt1 \"LL\")(setq s (strcat s pt1))(setq n (+ n 2))(set_tile \"tile0\" s)")
(action_tile "tile42" "(setq pt1 \"JC\")(setq s (strcat s pt1))(setq n (+ n 2))(set_tile \"tile0\" s)")
(action_tile "tile43" "(setq pt1 \"GL\")(setq s (strcat s pt1))(setq n (+ n 2))(set_tile \"tile0\" s)")
(action_tile "tile44" "(setq pt1 \"XGL\")(setq s (strcat s pt1))(setq n (+ n 3))(set_tile \"tile0\" s)")
(action_tile "tile45" "(setq pt1 \"WL\")(setq s (strcat s pt1))(setq n (+ n 2))(set_tile \"tile0\" s)")
(action_tile "tile46" "(setq pt1 \"TY\")(setq s (strcat s pt1))(setq n (+ n 2))(set_tile \"tile0\" s)")
(action_tile "tile47" "(setq pt1 \"@300\")(setq s (strcat s pt1))(setq n (+ n 2))(set_tile \"tile0\" s)")
(action_tile "accept" "(done_dialog 1)")
(start_dialog)
(unload_dialog dcl_id)
)
;;-----------------------------------------------------------------------------
(defun DCL-XZ-dcl (/ lst_str str file f)
(setq lst_str '(
" dhxz:dialog {"
" label=\"请给出文字或进行选择(编者:陈传建):?\";"
"initial_focus=tile0;"
" :boxed_radio_row {"
" label=\"文字内容为= :\";"
" :edit_box {"
" key=\"tile0\";"
" value=\"\";"
" allow_accept=true;"
" }"
"}"
" :boxed_radio_row {"
" :radio_button {"
" label=\".\";"
" key=\"tile24\";"
" }"
" :radio_button {"
" label=\"±\";"
" key=\"tile11\";"
" }"
" :radio_button {"
" label=\"%\";"
" key=\"tile12\";"
" }"
" :radio_button {"
" label=\"=\";"
" key=\"tile13\";"
" }"
" :radio_button {"
" label=\"一级筋\";"
" key=\"tile14\";"
" }"
" :radio_button {"
" label=\"二级筋\";"
" key=\"tile15\";"
" }"
" :radio_button {"
" label=\"三级筋\";"
" key=\"tile48\";"
" }"
"}"
" :row {"
" label=\"数字= :\";"
" :radio_button {"
" label=\"0\";"
" key=\"tile10\";"
" }"
" :radio_button {"
" label=\"1\";"
" key=\"tile1\";"
" }"
" :radio_button {"
" label=\"2\";"
" key=\"tile2\";"
" }"
" :radio_button {"
" label=\"3\";"
" key=\"tile3\";"
" }"
" :radio_button {"
" label=\"4\";"
" key=\"tile4\";"
" }"
" :radio_button {"
" label=\"5\";"
" key=\"tile5\";"
" }"
" :radio_button {"
" label=\"6\";"
" key=\"tile6\";"
" }"
" :radio_button {"
" label=\"7\";"
" key=\"tile7\";"
" }"
" :radio_button {"
" label=\"8\";"
" key=\"tile8\";"
" }"
" :radio_button {"
" label=\"9\";"
" key=\"tile9\";"
" }"
"}"
" :row {"
" label=\"常用符号= :\";"
" :column {"
" :radio_button {"
" label=\"±0.000\";"
" key=\"tile26\";"
" }"
" :radio_button {"
" label=\"@100\";"
" key=\"tile27\";"
" }"
" :radio_button {"
" label=\"@120\";"
" key=\"tile28\";"
" }"
" :radio_button {"
" label=\"@150\";"
" key=\"tile29\";"
" }"
" :radio_button {"
" label=\"@200\";"
" key=\"tile30\";"
" }"
" :radio_button {"
" label=\"@250\";"
" key=\"tile31\";"
" }"
"}"
" :column {"
" :radio_button {"
" label=\"GL\";"
" key=\"tile43\";"
" }"
" :radio_button {"
" label=\"XGL\";"
" key=\"tile44\";"
" }"
" :radio_button {"
" label=\"WL\";"
" key=\"tile45\";"
" }"
" :radio_button {"
" label=\"TY\";"
" key=\"tile46\";"
" }"
" :radio_button {"
" label=\"@300\";"
" key=\"tile47\";"
" }"
"}"
" :column {"
" :radio_button {"
" label=\"JQL\";"
" key=\"tile38\";"
" }"
" :radio_button {"
" label=\"YP\";"
" key=\"tile39\";"
" }"
" :radio_button {"
" label=\"XB\";"
" key=\"tile40\";"
" }"
" :radio_button {"
" label=\"LL\";"
" key=\"tile41\";"
" }"
" :radio_button {"
" label=\"JC\";"
" key=\"tile42\";"
" }"
"}"
" :column {"
" :radio_button {"
" label=\"@\";"
" key=\"tile16\";"
" }"
" :radio_button {"
" label=\";\";"
" key=\"tile17\";"
" }"
" :radio_button {"
" label=\",\";"
" key=\"tile18\";"
" }"
" :radio_button {"
" label=\":\";"
" key=\"tile19\";"
" }"
" :radio_button {"
" label=\"(\";"
" key=\"tile20\";"
" }"
"}"
" :column {"
" :radio_button {"
" label=\")\";"
" key=\"tile21\";"
" }"
" :radio_button {"
" label=\"+\";"
" key=\"tile22\";"
" }"
" :radio_button {"
" label=\"-\";"
" key=\"tile23\";"
" }"
" :radio_button {"
" label=\"<\";"
" key=\"tile32\";"
" }"
" :radio_button {"
" label=\">\";"
" key=\"tile25\";"
" }"
"}"
" :column {"
" :radio_button {"
" label=\"*\";"
" key=\"tile33\";"
" }"
" :radio_button {"
" label=\"[\";"
" key=\"tile34\";"
" }"
" :radio_button {"
" label=\"]\";"
" key=\"tile35\";"
" }"
" :radio_button {"
" label=\"a\";"
" key=\"tile36\";"
" }"
" :radio_button {"
" label=\"#\";"
" key=\"tile37\";"
" }"
"}"
"}"
"ok_cancel;"
" }"
)
)
(setq file (vl-filename-mktemp "DclTemp.dcl"))
(setq f (open file "w"))
(foreach str lst_str
(princ "\n" f)
(princ str f)
)
(close f)
;;返回
file
)
;;-------------------------------------------------------------------------
(defun SSET( )
(setq oldos (getvar "OSMODE"))
(setq oldorh (getvar "ORTHOMODE"))
(setq oldsn (getvar "SNAPMODE"))
(setvar "OSMODE" 0) ;;;捕捉关闭
(setvar "ORTHOMODE" 0) ;;;正交关闭
(setvar "SNAPMODE" 0);;;;实体捕捉关闭
(setvar "CMDECHO" 0)
(setvar "TEXTEVAL" 1)
)
;;---------------------------------------------------------------------------
(defun SSET1( )
(setvar "ORTHOMODE" oldorh);;;恢复正交
(setvar "OSMODE" oldos);;;恢复正交
(setvar "SNAPMODE" oldsn) ;;;;恢复实体捕捉
(setvar "CMDECHO" 1)
)
;;----------------------------------------------------------------------------
(defun XZ ( )
(SSET)
(setq p (strlen pt2))
(setq pt4 (polar pt1 ang p))
(setq pt3 (polar pt1 (+ ang pi) p))
(setvar "TEXTSTYLE" style)
(command "TEXT" pt3 3.0 ang pt2)
(setvar "TEXTSTYLE" "STANDARD")
(command "MOVE" (entlast) "" pt1 pause"")
(entupd (entlast))
(SSET1)
)
;;;--------------------------------------------------------------------
(defun C:SUAN-XZ(/ s n pt1 pt2 pt3 pt4 pt5 pt6 k1 k2 k3 dis ang p)
(setq style "STANDARD")
(DCLXZ)
(ENTS)
(setq pt2 S)
(setq ang (atof(angtos ang 0)))
(setvar "TEXTSTYLE" style)
(command "TEXT" pt5 3.0 ang pt2)
(setvar "TEXTSTYLE" "STANDARD")
(command "MOVE" (entlast) "" pt5 pause"")
(entupd (entlast))
(SSET1)
)
;;-------------------------------------------------------------------
(defun C:XZP(/ s n ang style pt1 pt2 pt3 pt4 p)
(DCLXZ)
(setq pt2 s)
(setq pt1 (nth 1 (grread 5)))
(setq ang 0)
(setq style "STANDARD")
(XZ)
)
;;--------------------------------------------------------------------------
(defun C:XZC(/ s n ang style pt1 pt2 pt3 pt4 p)
(DCLXZ)
(setq pt2 s)
(setq pt1 (nth 1 (grread 5)))
(setq ang 90)
(setq style "STANDARD")
(XZ)
)
;;-----------------------------------------------------------------------
;;---------------------------------------------------------------------------------
(defun C:XHZ(/ h1 ang s sl pt1 pt2 pt3 pt4 pt5 p p1 p2 k3 sty what_next)
(gc)
(if (or (not dcl_id1) (< (setq dcl_id1(load_dialog (xhz-dcl))) 0))
(setq dcl_id1(load_dialog (xhz-dcl)))
)
(if (not (new_dialog "xhz1" dcl_id1))
(exit)
)
(setq what_next 3)
(while (< 2 what_next)
(action_tile "tile0" "(setq s1 $value)")
(action_tile "tile1" "(set_tile \"tileh\" \"8\")")
(action_tile "tile2" "(set_tile \"tileh\" \"10\")")
(action_tile "tile3" "(set_tile \"tileh\" \"20\")")
(action_tile "tile4" "(done_dialog 4)")
(action_tile "tile5" "(set_tile \"tilea\" \"90\")")
(action_tile "tile6" "(set_tile \"tilea\" \"-90\")")
(action_tile "tile8" "(set_tile \"tile7\" \"HZ\")")
(action_tile "tile9" "(set_tile \"tile7\" \"XZ\")")
(action_tile "accept" "(setq h1 (atof(get_tile \"tileh\")))(setq ang (/ (* pi (atof(get_tile \"tilea\"))) 180))(setq sty (get_tile \"tile7\"))(done_dialog 1)")
(action_tile "tilec" "(done_dialog 5)")
(action_tile "tilepm" "(done_dialog 6)")
(action_tile "tilelp" "(done_dialog 7)")
(action_tile "tilezb" "(done_dialog 8)")
(setq what_next (start_dialog))
(cond ((= what_next 4)
(new_dialog "xhz1" dcl_id1)
(setq h1 (atof(get_tile "tileh")))
(setq sty (get_tile "tile7"))
(done_dialog 1)
(setq pt1 (entsel "\n请选择文字写线的实体线?:"))
(setq pt2 (nth 1 pt1))
(setq pt3 (nth 0 pt1))
(setq k3 (osnap pt2 "NEAR"))
(setq pt4 (osnap k3 "ENDPOINT"))
(setq pt5 (osnap k3 "MIDPOINT"))
(setq ang (angle pt5 pt4))
(setq pt1 (nth 1 (grread 5)))
(setvar "CMDECHO" 0)
(setvar "TEXTEVAL" 1)
(setq p (strlen s1))
(setq pt3 (polar pt1 ang p))
(setq pt4 (polar pt1 (+ ang pi) p))
(setvar "TEXTSTYLE" sty)
(command "TEXT" "J" "F" pt3 pt4 h1 s1)
(setvar "TEXTSTYLE" "STANDARD")
(command "MOVE" (entlast) "" pt1 pause"")
(entupd (entlast))
(setvar "CMDECHO" 1)
(unload_dialog dcl_id1)
(exit)
)
((= what_next 5)
(dclxz)
(new_dialog "xhz1" dcl_id1)
(set_tile "tile0" (strcat s1 s))
(setq what_next 3)
)
((= what_next 6)
(dclpm)
(new_dialog "xhz1" dcl_id1)
(set_tile "tile0" (strcat s1 s))
(setq what_next 3)
)
((= what_next 7)
(dcllp)
(new_dialog "xhz1" dcl_id1)
(set_tile "tile0" (strcat s1 s))
(setq what_next 3)
)
((= what_next 8)
(dclzb)
(new_dialog "xhz1" dcl_id1)
(set_tile "tile0" (strcat s1 s))
(setq what_next 3)
)
)
)
(unload_dialog dcl_id1)
(setvar "CMDECHO" 0)
(if(/= s1 "")
(progn
(setq pt1 (getpoint " \n请在屏幕上给出一点?:"))
(setvar "CMDECHO" 0)
(setvar "TEXTEVAL" 1)
(setq p (strlen s1))
(setq pt4 (polar pt1 ang p))
(setq pt3 (polar pt1 (+ ang pi) p))
(setvar "TEXTSTYLE" sty)
(command "TEXT" "J" "F" pt3 pt4 h1 s1)
(setvar "TEXTSTYLE" "STANDARD")
(command "MOVE" (entlast) "" pt1 pause"")
(entupd (entlast))
(setvar "CMDECHO" 1)
(exit)
)
)
(princ)
)
;;----------------------------------------------------------------------
(defun xhz-dcl (/ lst_str str file f)
(setq lst_str '(
"xhz1:dialog {"
" label=\"请给出有关文字及其参数(编者: 陈传建)?\";"
" initial_focus=tile0;"
":boxed_row {"
" label=\"文字为= :\";"
" :edit_box {"
" key=\"tile0\";"
" value=\"\";"
" allow_accept=true;"
" }"
"}"
" :boxed_row {"
" ///DCL文件注释形式"
" :radio_button {"
" label=\"字符->\";"
" key=\"tilec\";"
" }"
" :radio_button {"
" label=\"平面->\";"
" key=\"tilepm\";"
" }"
" :radio_button {"
" label=\"立剖面->\";"
" key=\"tilelp\";"
" }"
" :radio_button {"
" label=\"住宅办公->\";"
" key=\"tilezb\";"
" }"
" }"
" :boxed_radio_row {"
"label=\"字高\";"
" :edit_box {"
" key=\"tileh\";"
" value=\"6\";"
" allow_accept=true;"
" }"
" :radio_button {"
" label=\"8\";"
" key=\"tile1\";"
" }"
" :radio_button {"
" label=\"10\";"
" key=\"tile2\";"
" }"
" :radio_button {"
" label=\"20\";"
" key=\"tile3\";"
" }"
"}"
" :boxed_radio_row {"
" label=\"字角度\";"
" :edit_box {"
" key=\"tilea\";"
" value=\"0\";"
" allow_accept=true;"
" }"
" :radio_button {"
" label=\"选择直线<\";"
" key=\"tile4\";"
" }"
" :radio_button {"
" label=\"90\";"
" key=\"tile5\";"
" }"
" :radio_button {"
" label=\"-90\";"
" key=\"tile6\";"
" }"
"}"
" :boxed_radio_row {"
" label=\"文字字型\";"
" :edit_box {"
" key=\"tile7\";"
" value=\"STANDARD\";"
" allow_accept=true;"
" }"
" :radio_button {"
" label=\"细体字\";"
" key=\"tile8\";"
" is_default=true;"
" }"
" :radio_button {"
" label=\"空心字\";"
" key=\"tile9\";"
" }"
" } "
"ok_only;"
"}"
)
)
(setq file (vl-filename-mktemp "DclTemp.dcl"))
(setq f (open file "w"))
(foreach str lst_str
(princ "\n" f)
(princ str f)
)
(close f)
;;返回
file
)
;;----------------------------------------------------------------------
(defun DCLPM( )
(if (or (not dcl_id) (< (setq dcl_id(load_dialog (dcl-pm))) 0))
(setq dcl_id(load_dialog (dcl-pm))))
(if (not (new_dialog "dpm" dcl_id))(exit))
(action_tile "tile0" "(setq pt1 $value)(setq s pt1)(setq n (strlen pt1))")
(action_tile "tile1" "(setq pt1 \"平面\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile2" "(setq pt1 \"大样\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile3" "(setq pt1 \"放大\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile4" "(setq pt1 \"单元\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile5" "(setq pt1 \"屋面\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile6" "(setq pt1 \"图\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile7" "(setq pt1 \"一\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile8" "(setq pt1 \"二\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile9" "(setq pt1 \"三\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile10" "(setq pt1 \"四\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile11" "(setq pt1 \"五\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile12" "(setq pt1 \"六\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile13" "(setq pt1 \"层\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile14" "(setq pt1 \"标准\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile15" "(setq pt1 \"单元\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile16" "(setq pt1 \"厨厕\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile17" "(setq pt1 \"组合\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile18" "(setq pt1 \"地下\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile19" "(setq pt1 \"透视\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile20" "(setq pt1 \"夹层\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile21" "(setq pt1 \"详图\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile22" "(setq pt1 \"总\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile23" "(setq pt1 \"屋面\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile24" "(setq pt1 \"排水\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile25" "(setq pt1 \"楼梯\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile26" "(setq pt1 \"七\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile27" "(setq pt1 \"八\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile28" "(setq pt1 \"九\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile29" "(setq pt1 \"十\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile30" "(setq pt1 \"示意\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile31" "(setq pt1 \"道路\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile32" "(setq pt1 \"绿化\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile33" "(setq pt1 \"土方\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile34" "(setq pt1 \"布置\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile35" "(setq pt1 \"墙身\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile36" "(setq pt1 \"规划\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile37" "(setq pt1 \"现状\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile38" "(setq pt1 \"竖向\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile39" "(setq pt1 \"设计\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile40" "(setq pt1 \"综合\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile41" "(setq pt1 \"管线\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile42" "(setq pt1 \"居住\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile43" "(setq pt1 \"指标\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile44" "(setq pt1 \"用地\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile45" "(setq pt1 \"位置\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile46" "(setq pt1 \"表\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile47" "(setq pt1 \"单\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile48" "(setq pt1 \"建筑\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile49" "(setq pt1 \"材料\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile50" "(setq pt1 \"报价\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile51" "(setq pt1 \"预算\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile52" "(setq pt1 \"梁\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile53" "(setq pt1 \"柱\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile54" "(setq pt1 \"门\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile55" "(setq pt1 \"窗\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile56" "(setq pt1 \"混凝土\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile57" "(setq pt1 \"钢\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile58" "(setq pt1 \"现浇板\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile59" "(setq pt1 \"结构\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile60" "(setq pt1 \"配筋\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "accept" "(done_dialog 1)")
(start_dialog)
(unload_dialog dcl_id)
)
;;----------------------------------------------------------------------
(defun DCL-PM (/ lst_str str file f)
(setq lst_str '(
" dpm:dialog {"
" label=\"请给出文字或进行选择(编者:陈传建):?\";"
"initial_focus=tile0;"
" :boxed_radio_row {"
" label=\"文字内容为= :\";"
" :edit_box {"
" key=\"tile0\";"
" value=\"\";"
" allow_accept=true;"
" }"
"}"
" :boxed_radio_row {"
" :radio_button {"
" label=\"平面\";"
" key=\"tile1\";"
" }"
" :radio_button {"
" label=\"大样\";"
" key=\"tile2\";"
" }"
" :radio_button {"
" label=\"放大\";"
" key=\"tile3\";"
" }"
" :radio_button {"
" label=\"单元\";"
" key=\"tile4\";"
" }"
" :radio_button {"
" label=\"屋面\";"
" key=\"tile5\";"
" }"
" :radio_button {"
" label=\"图\";"
" key=\"tile6\";"
" }"
" :radio_button {"
" label=\"表\";"
" key=\"tile46\";"
" }"
" :radio_button {"
" label=\"单\";"
" key=\"tile47\";"
" }"
"}"
" :boxed_radio_row {"
" label=\"楼层:\";"
" :radio_button {"
" label=\"一\";"
" key=\"tile7\";"
" }"
" :radio_button {"
" label=\"二\";"
" key=\"tile8\";"
" }"
" :radio_button {"
" label=\"三\";"
" key=\"tile9\";"
" }"
" :radio_button {"
" label=\"四\";"
" key=\"tile10\";"
" }"
" :radio_button {"
" label=\"五\";"
" key=\"tile11\";"
" }"
" :radio_button {"
" label=\"六\";"
" key=\"tile12\";"
" }"
" :radio_button {"
" label=\"七\";"
" key=\"tile26\";"
" }"
" :radio_button {"
" label=\"八\";"
" key=\"tile27\";"
" }"
" :radio_button {"
" label=\"九\";"
" key=\"tile28\";"
" }"
" :radio_button {"
" label=\"十\";"
" key=\"tile29\";"
" }"
" :radio_button {"
" label=\"层\";"
" key=\"tile13\";"
" }"
"}"
" :boxed_radio_row {"
" label=\"结构:\";"
" :radio_button {"
" label=\"梁\";"
" key=\"tile52\";"
" }"
" :radio_button {"
" label=\"柱\";"
" key=\"tile53\";"
" }"
" :radio_button {"
" label=\"门\";"
" key=\"tile54\";"
" }"
" :radio_button {"
" label=\"窗\";"
" key=\"tile55\";"
" }"
" :radio_button {"
" label=\"混凝土\";"
" key=\"tile56\";"
" }"
" :radio_button {"
" label=\"钢\";"
" key=\"tile57\";"
" }"
" :radio_button {"
" label=\"现浇板\";"
" key=\"tile58\";"
" }"
" :radio_button {"
" label=\"结构\";"
" key=\"tile59\";"
" }"
" :radio_button {"
" label=\"配筋\";"
" key=\"tile60\";"
" }"
"}"
" :row {"
" label=\"常用:\";"
" :column {"
" :radio_button {"
" label=\"标准\";"
" key=\"tile14\";"
" }"
" :radio_button {"
" label=\"单元\";"
" key=\"tile15\";"
" }"
" :radio_button {"
" label=\"厨厕\";"
" key=\"tile16\";"
" }"
" :radio_button {"
" label=\"组合\";"
" key=\"tile17\";"
" }"
"}"
" :column {"
" :radio_button {"
" label=\"地下\";"
" key=\"tile18\";"
" }"
" :radio_button {"
" label=\"透视\";"
" key=\"tile19\";"
" }"
" :radio_button {"
" label=\"夹层\";"
" key=\"tile20\";"
" }"
" :radio_button {"
" label=\"详图\";"
" key=\"tile21\";"
" }"
"}"
" :column {"
" :radio_button {"
" label=\"总\";"
" key=\"tile22\";"
" }"
" :radio_button {"
" label=\"屋面\";"
" key=\"tile23\";"
" }"
" :radio_button {"
" label=\"排水\";"
" key=\"tile24\";"
" }"
" :radio_button {"
" label=\"楼梯\";"
" key=\"tile25\";"
" }"
"}"
" :column {"
" :radio_button {"
" label=\"示意\";"
" key=\"tile30\";"
" }"
" :radio_button {"
" label=\"道路\";"
" key=\"tile31\";"
" }"
" :radio_button {"
" label=\"绿化\";"
" key=\"tile32\";"
" }"
" :radio_button {"
" label=\"土方\";"
" key=\"tile33\";"
" }"
"}"
" :column {"
" :radio_button {"
" label=\"布置\";"
" key=\"tile34\";"
" }"
" :radio_button {"
" label=\"墙身\";"
" key=\"tile35\";"
" }"
" :radio_button {"
" label=\"规划\";"
" key=\"tile36\";"
" }"
" :radio_button {"
" label=\"现状\";"
" key=\"tile37\";"
" }"
"}"
" :column {"
" :radio_button {"
" label=\"竖向\";"
" key=\"tile38\";"
" }"
" :radio_button {"
" label=\"设计\";"
" key=\"tile39\";"
" }"
" :radio_button {"
" label=\"综合\";"
" key=\"tile40\";"
" }"
" :radio_button {"
" label=\"管线\";"
" key=\"tile41\";"
" }"
"}"
" :column {"
" :radio_button {"
" label=\"居住\";"
" key=\"tile42\";"
" }"
" :radio_button {"
" label=\"指标\";"
" key=\"tile43\";"
" }"
" :radio_button {"
" label=\"用地\";"
" key=\"tile44\";"
" }"
" :radio_button {"
" label=\"位置\";"
" key=\"tile45\";"
" }"
"}"
" :column {"
" :radio_button {"
" label=\"建筑\";"
" key=\"tile48\";"
" }"
" :radio_button {"
" label=\"材料\";"
" key=\"tile49\";"
" }"
" :radio_button {"
" label=\"报价\";"
" key=\"tile50\";"
" }"
" :radio_button {"
" label=\"预算\";"
" key=\"tile51\";"
" }"
"}"
" }"
"ok_cancel;"
" }"
)
)
(setq file (vl-filename-mktemp "DclTemp.dcl"))
(setq f (open file "w"))
(foreach str lst_str
(princ "\n" f)
(princ str f)
)
(close f)
;;返回
file
)
;;---------------------------------------------------------
(defun DCLLP( )
(if (or (not dcl_id) (< (setq dcl_id(load_dialog (dcl-lp))) 0))
(setq dcl_id(load_dialog (dcl-lp))))
(if (not (new_dialog "dlp" dcl_id))(exit))
(action_tile "tile0" "(setq pt1 $value)(setq s pt1)(setq n (strlen pt1))")
(action_tile "tile1" "(setq pt1 \"立面\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile2" "(setq pt1 \"剖面\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile3" "(setq pt1 \"东\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile4" "(setq pt1 \"西\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile5" "(setq pt1 \"南\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile6" "(setq pt1 \"北\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile7" "(setq pt1 \"正\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile8" "(setq pt1 \"侧\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile9" "(setq pt1 \"背\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile10" "(setq pt1 \"1-1\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile11" "(setq pt1 \"2-2\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile12" "(setq pt1 \"3-3\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile13" "(setq pt1 \"4-4\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile14" "(setq pt1 \"A-A\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile15" "(setq pt1 \"B-B\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile16" "(setq pt1 \"C-C\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile17" "(setq pt1 \"D-D\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile18" "(setq pt1 \"图\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "accept" "(done_dialog 1)")
(start_dialog)
(unload_dialog dcl_id)
)
;;----------------------------------------------------------------------
(defun DCL-LP (/ lst_str str file f)
(setq lst_str '(
" dlp:dialog {"
" label=\"请给出文字或进行选择(编者:陈传建):?\";"
"initial_focus=tile0;"
" :boxed_radio_row {"
" label=\"文字内容为= :\";"
" :edit_box {"
" key=\"tile0\";"
" value=\"\";"
" allow_accept=true;"
" }"
"}"
" :boxed_radio_row {"
" :radio_button {"
" label=\"立面\";"
" key=\"tile1\";"
" }"
" :radio_button {"
" label=\"剖面\";"
" key=\"tile2\";"
" }"
" :radio_button {"
" label=\"东\";"
" key=\"tile3\";"
" }"
" :radio_button {"
" label=\"西\";"
" key=\"tile4\";"
" }"
" :radio_button {"
" label=\"南\";"
" key=\"tile5\";"
" }"
" :radio_button {"
" label=\"北\";"
" key=\"tile6\";"
" }"
" :radio_button {"
" label=\"正\";"
" key=\"tile7\";"
" }"
" :radio_button {"
" label=\"侧\";"
" key=\"tile8\";"
" }"
" :radio_button {"
" label=\"背\";"
" key=\"tile9\";"
" }"
" :radio_button {"
" label=\"图\";"
" key=\"tile18\";"
" }"
"}"
" :boxed_radio_row {"
" label=\"符号:\";"
" :radio_button {"
" label=\"1-1\";"
" key=\"tile10\";"
" }"
" :radio_button {"
" label=\"2-2\";"
" key=\"tile11\";"
" }"
" :radio_button {"
" label=\"3-3\";"
" key=\"tile12\";"
" }"
" :radio_button {"
" label=\"4-4\";"
" key=\"tile13\";"
" }"
" :radio_button {"
" label=\"A-A\";"
" key=\"tile14\";"
" }"
" :radio_button {"
" label=\"B-B\";"
" key=\"tile15\";"
" }"
" :radio_button {"
" label=\"C-C\";"
" key=\"tile16\";"
" }"
" :radio_button {"
" label=\"D-D\";"
" key=\"tile17\";"
" }"
" }"
"ok_cancel;"
" }"
)
)
(setq file (vl-filename-mktemp "DclTemp.dcl"))
(setq f (open file "w"))
(foreach str lst_str
(princ "\n" f)
(princ str f)
)
(close f)
;;返回
file
)
;;------------------------------------------------------------
(defun DCLZB( )
(if (or (not dcl_id) (< (setq dcl_id(load_dialog (dcl-zb))) 0))
(setq dcl_id(load_dialog (dcl-zb))))
(if (not (new_dialog "dzb" dcl_id))(exit))
(action_tile "tile0" "(setq pt1 $value)(setq s pt1)(setq n (strlen pt1))")
(action_tile "tile1" "(setq pt1 \"室\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile2" "(setq pt1 \"空间\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile3" "(setq pt1 \"示意\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile4" "(setq pt1 \"主\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile5" "(setq pt1 \"前\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile6" "(setq pt1 \"后\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile7" "(setq pt1 \"正\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile8" "(setq pt1 \"侧\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile9" "(setq pt1 \"间\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile10" "(setq pt1 \"门厅\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile11" "(setq pt1 \"卧室\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile12" "(setq pt1 \"起居\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile13" "(setq pt1 \"会客\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile14" "(setq pt1 \"餐厅\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile15" "(setq pt1 \"厨房\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile16" "(setq pt1 \"盥洗\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile17" "(setq pt1 \"卫生\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile18" "(setq pt1 \"厕所\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile19" "(setq pt1 \"书房\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile20" "(setq pt1 \"过厅\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile21" "(setq pt1 \"过道\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile22" "(setq pt1 \"走廊\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile23" "(setq pt1 \"储藏\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile24" "(setq pt1 \"楼梯\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile25" "(setq pt1 \"壁柜\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile26" "(setq pt1 \"冰箱\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile27" "(setq pt1 \"洗衣机\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile28" "(setq pt1 \"活动\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile29" "(setq pt1 \"会议\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile30" "(setq pt1 \"值班\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile31" "(setq pt1 \"办公\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile32" "(setq pt1 \"接待\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile33" "(setq pt1 \"休息\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile34" "(setq pt1 \"微机\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile35" "(setq pt1 \"打字\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile36" "(setq pt1 \"档案\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile37" "(setq pt1 \"电梯\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile38" "(setq pt1 \"财务\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile39" "(setq pt1 \"秘书\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile40" "(setq pt1 \"库房\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile41" "(setq pt1 \"写字\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile42" "(setq pt1 \"开水\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile43" "(setq pt1 \"洗消\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "tile44" "(setq pt1 \"消防\")(setq s (strcat s pt1))(setq n (+ n 1))(set_tile \"tile0\" s)")
(action_tile "accept" "(done_dialog 1)")
(start_dialog)
(unload_dialog dcl_id)
)
;;----------------------------------------------------------------------
(defun DCL-ZB (/ lst_str str file f)
(setq lst_str '(
" dzb:dialog {"
" label=\"请给出文字或进行选择(编者:陈传建):?\";"
"initial_focus=tile0;"
" :boxed_radio_row {"
" label=\"文字内容为= :\";"
" :edit_box {"
" key=\"tile0\";"
" value=\"\";"
" allow_accept=true;"
" }"
"}"
" :boxed_radio_row {"
" :radio_button {"
" label=\"室\";"
" key=\"tile1\";"
" }"
" :radio_button {"
" label=\"空间\";"
" key=\"tile2\";"
" }"
" :radio_button {"
" label=\"示意\";"
" key=\"tile3\";"
" }"
" :radio_button {"
" label=\"主\";"
" key=\"tile4\";"
" }"
" :radio_button {"
" label=\"前\";"
" key=\"tile5\";"
" }"
" :radio_button {"
" label=\"后\";"
" key=\"tile6\";"
" }"
" :radio_button {"
" label=\"正\";"
" key=\"tile7\";"
" }"
" :radio_button {"
" label=\"侧\";"
" key=\"tile8\";"
" }"
" :radio_button {"
" label=\"间\";"
" key=\"tile9\";"
" }"
"}"
" :row {"
" label=\"房间名:\";"
" :column {"
" :radio_button {"
" label=\"门厅\";"
" key=\"tile10\";"
" }"
" :radio_button {"
" label=\"卧室\";"
" key=\"tile11\";"
" }"
" :radio_button {"
" label=\"起居\";"
" key=\"tile12\";"
" }"
" :radio_button {"
" label=\"会客\";"
" key=\"tile13\";"
" }"
" :radio_button {"
" label=\"餐厅\";"
" key=\"tile14\";"
" }"
"}"
" :column {"
" :radio_button {"
" label=\"厨房\";"
" key=\"tile15\";"
" }"
" :radio_button {"
" label=\"盥洗\";"
" key=\"tile16\";"
" }"
" :radio_button {"
" label=\"卫生\";"
" key=\"tile17\";"
" }"
" :radio_button {"
" label=\"厕所\";"
" key=\"tile18\";"
" }"
" :radio_button {"
" label=\"书房\";"
" key=\"tile19\";"
" }"
" }"
" :column {"
" :radio_button {"
" label=\"过厅\";"
" key=\"tile20\";"
" }"
" :radio_button {"
" label=\"过道\";"
" key=\"tile21\";"
" }"
" :radio_button {"
" label=\"走廊\";"
" key=\"tile22\";"
" }"
" :radio_button {"
" label=\"储藏\";"
" key=\"tile23\";"
" }"
" :radio_button {"
" label=\"楼梯\";"
" key=\"tile24\";"
" }"
"}"
" :column {"
" :radio_button {"
" label=\"壁柜\";"
" key=\"tile25\";"
" }"
" :radio_button {"
" label=\"冰箱\";"
" key=\"tile26\";"
" }"
" :radio_button {"
" label=\"洗衣机\";"
" key=\"tile27\";"
" }"
" :radio_button {"
" label=\"活动\";"
" key=\"tile28\";"
" }"
" :radio_button {"
" label=\"会议\";"
" key=\"tile29\";"
" }"
"}"
" :column {"
" :radio_button {"
" label=\"值班\";"
" key=\"tile30\";"
" }"
" :radio_button {"
" label=\"办公\";"
" key=\"tile31\";"
" }"
" :radio_button {"
" label=\"接待\";"
" key=\"tile32\";"
" }"
" :radio_button {"
" label=\"休息\";"
" key=\"tile33\";"
" }"
" :radio_button {"
" label=\"微机\";"
" key=\"tile34\";"
" }"
"}"
" :column {"
" :radio_button {"
" label=\"打字\";"
" key=\"tile35\";"
" }"
" :radio_button {"
" label=\"档案\";"
" key=\"tile36\";"
" }"
" :radio_button {"
" label=\"电梯\";"
" key=\"tile37\";"
" }"
" :radio_button {"
" label=\"财务\";"
" key=\"tile38\";"
" }"
" :radio_button {"
" label=\"秘书\";"
" key=\"tile39\";"
" }"
"}"
" :column {"
" :radio_button {"
" label=\"库房\";"
" key=\"tile40\";"
" }"
" :radio_button {"
" label=\"写字\";"
" key=\"tile41\";"
" }"
" :radio_button {"
" label=\"开水\";"
" key=\"tile42\";"
" }"
" :radio_button {"
" label=\"洗消\";"
" key=\"tile43\";"
" }"
" :radio_button {"
" label=\"消防\";"
" key=\"tile44\";"
" }"
"}"
"}"
"ok_cancel;"
" }"
)
)
(setq file (vl-filename-mktemp "DclTemp.dcl"))
(setq f (open file "w"))
(foreach str lst_str
(princ "\n" f)
(princ str f)
)
(close f)
;;返回
file
)
;;----------------------------------------------------------------------
页:
[1]