Dcl问题
有人愿意发布dcl lisp的简单示例吗? 可以查看教程中的示例。当做 我正在寻求帮助。这是可行的,但问题是插入按钮什么都不做。我想得到一个插入和取消按钮去,但每次我尝试acad锁定。我如何让按钮工作?
这真的令人沮丧!
Panel : dialog { //dialog name
label = "Insert Panels";//dialog label
:boxed_radio_column { //define radio column
label = "Panel" ; //give it a label
: radio_button { //define radion button
key = "p1" ; //give it a name
label = "1" ;//give it a label
value = "1" ;
} //end definition
: radio_button { //define radio button
key = "p2" ; //give it a name
label = "2" ;
//give it a label
} //end definition
: radio_button { //define radio button
key = "p3" ; //give it a name
label = "3" ;
//give it a label
} //end definition
: radio_button { //define radio button
key = "p4" ; //give it a name
label = "4" ;
//give it a label
}
}
: button
{
key = "accept";
label = "INSERT";
is_default = true;
fixed_width = true;
alignment = centered;
}
: row { //define row
: image { //define image tile
key = "im" ; //give it a name
height = 1.0 ; //and a height
width = 3.0 ; //and now a width
} //end image
: paragraph { //define paragraph
: text_part { //define text
label = "Created by Reid Booe";//give it some text
}
} //end paragraph
} //end row
} //end dialog
(defun C:test ( )
(setq dcl_id (load_dialog "Panel.dcl"))
(if (not (new_dialog "Panel" dcl_id))
(exit)
);if
(setq w (dimx_tile "im") ;get image tile width
h (dimy_tile "im") ;get image tile height
);setq
(start_image "im") ;start the image
(fill_image 0 0 w h 5) ;fill it with blue
(end_image) ;end image
(action_tile "p1" "(setq panel \"1\")");store hole type
(action_tile "p2" "(setq panel \"2\")");store hole type
(action_tile "p3" "(setq panel \"3\")");store hole type
(action_tile "p4" "(setq panel \"4\")");store hole type
(action_tile "accept"
"(done_dialog)"
);action_tile
(start_dialog)
(unload_dialog dcl_id)
(command "_insert" panel pause "" "" pause)
(princ) 您需要测试用于退出对话框的方法-可以为此使用DISTAT系统变量;我对您的代码做了一些更改:
关于, 非常感谢你!我在这里拔头发。 不客气!
另一种方法是测试START_DIALOG语句返回的值(1表示OK,0表示Cancel)。
当做 问题在新的图纸上,我得到了这样的信息:;错误:自动化错误。文件服务器错误
但当我再试一次,它的工作。代码有什么问题?
与上面的代码不同,但我确实在里面有你给我的代码 我想出来了。没有关系
页:
[1]