明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 900|回复: 5

[提问] 麻烦帮忙看下这个对话框的控制参数怎么执行不了?

[复制链接]
发表于 2015-8-1 03:36:37 | 显示全部楼层 |阅读模式

复制代码
子程序单独运行都没问题,但是一调用对话框就死机了,cad重启N次还是不行
  1. (defun c:nice_frame ()
  2.   (setq dcl_id (load_dialog "nice_frame.dcl"))
  3.   (new_dialog "nice_frame" dcl_id)
  4.   ;动作参数
  5.   (action_tile "nice_dcl_insertframe" "(nice_insertframe) (done_dialog)")
  6.   (action_tile "nice_dcl_insertdirectory" "(nice_insertdirectory) (done_dialog)")
  7.   (action_tile "nice_dcl_insertfram_modify" "(nice_insertfram_modify) (done_dialog)")
  8.   (action_tile "nice_dcl_makediractory" "(nice_makediractory) (done_dialog)")
  9.   (action_tile "cancel" "(done_dialog)")
  10.   (start_dialog)
  11.   (unload_dialog dcl_id)
  12. )
这个是函数主程序的对话框相关的东东
  1. nice_frame:dialog {
  2.     label = "图框目录 v1.0 2015.8.1 by【九群】";
  3.     :boxed_row {
  4.         :boxed_column {
  5.             width = 8;
  6.             fixed_width = true;
  7.             label = "图框";
  8.             :button {
  9.                 key = "nice_dcl_insertframe";
  10.                 label = "插入图框";
  11.                 width = 8;
  12.                 }
  13.             :button {
  14.                 key = "nice_dcl_insertfram_modify";
  15.                 label = "插入改图框";
  16.                 width = 8;
  17.                 }
  18.             }
  19.         :boxed_column {
  20.             label = "目录";
  21.             :button {
  22.                 key = "nice_dcl_insertdirectory";
  23.                 label = "空白目录";
  24.                 width = 8;
  25.                 }
  26.             :button {
  27.                 key = "nice_dcl_makediractory";
  28.                 label = "填写目录";
  29.                 width = 8;
  30.                 }
  31.             }
  32.         }
  33.     cancel_button ;
  34.     }
这个是对话框的定义文件,奇了怪了
发表于 2015-8-1 08:44:31 | 显示全部楼层
没有问题啊
 楼主| 发表于 2015-8-1 10:43:06 来自手机 | 显示全部楼层
zkq1212 发表于 2015-8-1 08:44:31
没有问题啊

我也是看不出问题来,奇怪了来自: Android客户端
发表于 2015-8-1 11:49:47 | 显示全部楼层
调用了没问题啊
发表于 2020-2-11 22:44:13 | 显示全部楼层
所有 label = "空白目录";    要改成  label = \"空白目录\";
发表于 2020-2-17 11:08:53 | 显示全部楼层
(defun c:nice_frame()
  (setq dcl_id (load_dialog (nicek)))
  (new_dialog "nice_frame" dcl_id)
  ;动作参数
  (action_tile "nice_dcl_insertframe" "(nice_insertframe) (done_dialog)")
  (action_tile "nice_dcl_insertdirectory" "(nice_insertdirectory) (done_dialog)")
  (action_tile "nice_dcl_insertfram_modify" "(nice_insertfram_modify) (done_dialog)")
  (action_tile "nice_dcl_makediractory" "(nice_makediractory) (done_dialog)")
  (action_tile "cancel" "(done_dialog)")
  (start_dialog)
  (unload_dialog dcl_id)
)

(defun nicek(/ lst_str str file f)
                (setq lst_str '(
"nice_frame:dialog { "
"    label = \"图框目录\";"
"    :boxed_row { "
"        :boxed_column { "
"            width = 8;"
"            fixed_width = true;"
"            label = \"图框\";"
"            :button { "
"                key = \"nice_dcl_insertframe\";"
"                label = \"插入图框\";"
"                width = 8;"
"                }"
"            :button { "
"                key = \"nice_dcl_insertfram_modify\";"
"                label = \"插入改图框\";"
"                width = 8;"
"                }"
"            }"
"        :boxed_column { "
"            label = \"目录\";"
"            :button { "
"                key = \"nice_dcl_insertdirectory\";"
"                label = \"空白目录\";"
"                width = 8;"
"                }"
"            :button { "
"                key = \"nice_dcl_makediractory\";"
"                label = \"填写目录\";"
"                width = 8;"
"                }"
"            }"
"        }"
"    cancel_button ; "
"    }"
                    )
    )
    (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
)
;;;=================================================================*
(princ)
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-5-18 09:50 , Processed in 0.181465 second(s), 28 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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