本帖最后由 作者 于 2008-6-16 13:22:32 编辑
这个也太汗了吧。。。这么求距离? (defun c:pls () (if (setq fn (findfile "plus.odcl")) (dcl_PROJECT_LOAD fn) ) (if (and (setq pt1 (getpoint " insert point1")) (setq pt2 (getpoint pt1 " insert point2")) ) (progn (if (not (dcl_Form_IsActive plus_plus)) (dcl_Form_Show plus_plus) ) ) ) ) (defun c:plus_plus_btnp_OnClicked () (setq dis (distance pt1 pt2)) (dcl_Control_SetText plus_plus_text1 (rtos dis 2 3) ) )
粗略修改了一下 |