我弄了个画圆的程序,不知道哪里有问题,无法实现DCL控制画圆,求高手帮忙看看 lsp程序 (defun c:rect() (setq dcl_id (load_dialog "circle")) (new_dialog "rect" dcl_id) (action_tile "accept" "(sae_alue)") (start_dialog) (unload_dialog dcl_id) ) (defun c:yuan() (setq pt (getpoint "输入圆心坐标:")) (setq r (getreal "输入半径")) (command "circle" pt r ) ) (defun sae_alue () (setq r (atof (get_tile "react_h")) (setq pt (atof (get_tile "react_w")) (done_dialog) ) DCL程序 rect:dialog { label="画圆程序" ; :edit_box //编辑框元件 { label="输入圆心 : " ; key="rect_w" ; edit_limit=16; edit_width=20; fixed_width=true; } :edit_box //编辑框元件 { label="输入半径 :" ; key="rect_h" ; edit_limit=16; edit_width=20; fixed_width=true; } ok_cancel; }
|