明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1424|回复: 2

怎么获取dcl-onwx开关的值

[复制链接]
发表于 2009-9-23 09:05:00 | 显示全部楼层 |阅读模式

怎么获取dcl-onwx开关的值

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
 楼主| 发表于 2009-9-23 09:05:00 | 显示全部楼层
本帖最后由 作者 于 2009-9-23 14:06:17 编辑

;;;______________________分隔线________________________________
(defun c:FZZ ()
  (setvar "cmdecho" 0)
  (dcl_FZZ)
  (prin1)
)
;;;______________________分隔线________________________________
(defun dcl_FZZ ()
  (setq dcl_id (load_dialog "Q_FZZ"))
  (new_dialog "Q_FZZ" dcl_id)
  (def_FZZ)
  (action_tile "kimage1" "(setq ddtype 1)")
  (action_tile "kimage2" "(setq ddtype 2)")
  (action_tile "kimage3" "(setq ddtype 3)")
  (action_tile "kimage4" "(setq ddtype 4)")
  (action_tile "kimage5" "(setq ddtype 5)")
  (action_tile "kimage6" "(setq ddtype 6)")
  (action_tile "kimage7" "(setq ddtype 7)")
;;;  (action_tile "dcl-onwx" "(ok_FZZ)")
  (action_tile "bb3" "(qdio_zuozhe)")
  (action_tile "accept" "(ok_FZZ)(done_dialog 1)")
  (setq dd (start_dialog))
  (if (= dd 1)
    (draw_FZZ)
  )
  (if (= dd 5)
    (progn
      (setq dcl_id2 (load_dialog "ty.dcl"))
      (new_dialog "zuozhe_dcl" dcl_id2)
      (action_tile "accept" "(done_dialog 0)")
      (setq dd (start_dialog))
    )
  )
)
;;;______________________分隔线________________________________
(defun def_FZZ ()
  (set_tile "kww" "100")
  (set_tile "khh" "60")
  (setq sldkey_list
  '("kimage1" "kimage2" "kimage3" "kimage4" "kimage5" "kimage6"
    "kimage7")
  )
  (setq sld_list '("XG_Z" "CT_P" "CT_FL" "XG_QZ" "CT_X" "CT_L" "XG_Z3"))
  (mapcar 'show_sld sldkey_list sld_list)
)
;;;______________________分隔线________________________________
(defun show_sld (key sld)
  (setq x (dimx_tile key))
  (setq y (dimy_tile key))
  (start_image key)
  (fill_image 0 0 x y -2)
  (slide_image 0 0 x y sld)
  (end_image)
)
;;;______________________分隔线________________________________

***************************************此处获取值*****************************************************


(defun ok_FZZ () (setq onwx2 (atoi (get_tile "dcl-onwx"))))
;;;______________________分隔线________________________________
(defun draw_FZZ ()
  (cond
    ((= ddtype 1) (draw_XG_Z))
    ((= ddtype 2) (draw_CT_P))
    ((= ddtype 3) (draw_CT_FL))
    ((= ddtype 4) (draw_XG_QZ))
    ((= ddtype 5) (draw_CT_X))
    ((= ddtype 6) (draw_CT_L))
    ((= ddtype 7) (draw_XG_Z3))
  )
)

 楼主| 发表于 2009-9-23 09:06:00 | 显示全部楼层

DCL

Q_FZZ:dialog{
 label="图像按钮辅助【入子侧视】";
 :boxed_column{
  label="视图样式";
  :row{:image_button {key = "kimage1";color = -2;width = 30;aspect_ratio = 0.8;allow_accept = true;}
       :image_button {key = "kimage2";color = -2;width = 30;aspect_ratio = 0.8;allow_accept = true;}
       :image_button {key = "kimage3";color = -2;width = 30;aspect_ratio = 0.8;allow_accept = true;}}
  :row{:image_button {key = "kimage4";color = -2;width = 30;aspect_ratio = 0.8;allow_accept = true;}
       :image_button {key = "kimage5";color = -2;width = 30;aspect_ratio = 0.8;allow_accept = true;}
       :image_button {key = "kimage6";color = -2;width = 30;aspect_ratio = 0.8;allow_accept = true;}}
  :row{:image_button {key = "kimage7";color = -2;width = 30;aspect_ratio = 0.8;allow_accept = true;}
       :image_button {key = "kimage8";color = -2;width = 30;aspect_ratio = 0.8;allow_accept = true;}
       :image_button {key = "kimage9";color = -2;width = 30;aspect_ratio = 0.8;allow_accept = true;}}
  }
          spacer_1;
           :boxed_column{:toggle{label="绘制零件外框";key="dcl-onwx";}fixed_width=true;alignment=centered;}
   spacer_1;
          :row{fixed_width=true;alignment=centered;
        :row{:button{label="确定";key="ok";is_default=true;}
      :button{label="取消";key="Ca";is_cancel=true;}}
               :button{label="关 于";key="bb3";}}
               }

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-10-1 15:20 , Processed in 0.189454 second(s), 27 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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