zoukankan      html  css  js  c++  java
  • AutoLISP单选按钮RADIO_BUTTON设计插入图块

    AutoLISP单选按钮RADIO_BUTTON设计插入图块,DCL对话框代码如下。

    dia6b:dialog {
        label = "RADIO_BUTTON单选按钮" ;
        :text {
            alignment = centered ;
            label = "插入图块" ;
        }
        :row {
            :boxed_radio_column {
                label = "设计者" ;
                :radio_button {
                    key = "rb11" ;
                    label = "唐僧" ;
                }
                :radio_button {
                    key = "rb12" ;
                    label = "悟空" ;
                }
                :radio_button {
                    key = "rb13" ;
                    label = "八戒" ;
                }
                :radio_button {
                    key = "rb14" ;
                    label = "沙僧" ;
                }
            }
            :boxed_radio_column {
                label = "比例" ;
                :radio_button {
                    key = "rb21" ;
                    label = "1/1" ;
                }
                :radio_button {
                    key = "rb22" ;
                    label = "1/30" ;
                }
                :radio_button {
                    key = "rb23" ;
                    label = "1/50" ;
                }
                :radio_button {
                    key = "rb24" ;
                    label = "1/100" ;
                }
                :radio_button {
                    key = "rb25" ;
                    label = "1/200" ;
                }
            }
        }
        :edit_box {
            alignment = centered ;
            edit_limit = 8 ;
            edit_width = 8 ;
            fixed_width = true ;
            key = "dwgnum" ;
            label = "编号" ;
        }
        spacer_1;
        :row {
            alignment = centered ;
            fixed_width = true ;
            :button {
                key = "ins_ok" ;
                label = "插入图块" ;
                width = 8 ;
            }
            :spacer {
                width = 8 ;
            }
            cancel_button;
        }
    }

    LSP文件代码如下。

    (defun c:dia6b ()
        (setvar "cmdecho" 0)
        (setq blkname "dia6att")
        (dcl_dia6b)
        (prin1)
    )
    (defun dcl_dia6b ()
        (setq dcl_id (load_dialog "dia6b"))
        (new_dialog "dia6b" dcl_id)
        (setq defkey1 "rb14"
          defkey2 "rb21"
        )
        (set_tile defkey1 "1")
        (set_tile defkey2 "1")
        (setq name (get_attr defkey1 "label"))
        (setq ssca (get_attr defkey2 "label"))
        (action_tile "rb11" "(setq name (get_attr $key \"label\"))")
        (action_tile "rb12" "(setq name (get_attr $key \"label\"))")
        (action_tile "rb13" "(setq name (get_attr $key \"label\"))")
        (action_tile "rb14" "(setq name (get_attr $key \"label\"))")
        (action_tile "rb21" "(setq name (get_attr $key \"label\"))")
        (action_tile "rb22" "(setq name (get_attr $key \"label\"))")
        (action_tile "rb23" "(setq name (get_attr $key \"label\"))")
        (action_tile "rb24" "(setq name (get_attr $key \"label\"))")
        (action_tile "rb25" "(setq name (get_attr $key \"label\"))")
        (action_tile "ins_ok" "(ok_dia6b) (done_dialog 1)")
        (setq dd (start_dialog))
        (if    (= dd 1)
        (progn
            (setq inspt (getpoint "\n选取属性图块插入点:"))
            (command "insert" blkname inspt 1 1 0 dwgnum name ssca)
        )
        )
    )
    (defun ok_dia6b    ()
        (setq dwgnum (get_tile "dwgnum"))
    )

    代码完。

    作者:codee
    文章千古事,得失寸心知。


  • 相关阅读:
    将C#文档注释生成.chm帮助文档
    Gacutil.exe(全局程序集缓存工具)
    虚拟分区安装
    ListView控件绑定DataSet
    DataSet之增删改查操作(DataGridView绑定)
    Win8系统如何关闭用户账户控制UAC
    win8系统 重装系统如何删除EFI分区
    win8系统 如何默认显示文件扩展名和显示隐藏文件
    win8系统 如何不显示这台电脑的文件夹
    Win7 本地打印后台处理程序服务没有运 怎么办
  • 原文地址:https://www.cnblogs.com/bimgoo/p/2503066.html
Copyright © 2011-2022 走看看