Vlisp交互VB窗体---按纽取值
本帖最后由 jfxia 于 2012-3-28 09:51 编辑(defun c:tt1()
(vl-load-com)
(setq ACAD (Vlax-Get-Acad-Object))
(setq Doc (Vlax-Get (Vlax-Get ACAD 'ActiveDocument) 'ModelSpace))
(if (not (setq LayerMana (Vlax-Create-Object "LayerM1.LayerMClass1" )));这里是工程名.类名
(startapp "regsvr32 C:\\LayerM.dll /s");注册DLL 这里改成你制作的DLL路径
)
(setq LayerMana (Vlax-Create-Object "LayerM1.LayerMClass1" ))
(setq LayerMfrm (Vlax-Invoke-Method LayerMana 'ShowWnd (Vlax-Get ACAD 'HWND )))
(setq key (vlax-get LayerMfrm'Allon_press))
;(Vlax-Put-Property (vlax-get frm 'Text1) 'Text "20");赋值
;(while (setq pt (getpoint))
; (Vlax-Invoke Doc 'AddCircle pt (vlax-get-property (vlax-get frm 'Text1) 'Text));取值
;)
;(while (setq get (car (entsel)))
; (Vlax-Put-Property (vlax-get frm 'Text2) 'Text (cdr (assoc 0 (entget get))))
;)
(princ)
)
以上为Nosmall版大的名句, 是取得VB窗体中文本的值.
我想问: 如果以下语句改为取得按纽的key值怎样操作??
(vlax-get-property (vlax-get frm 'Text1) 'Text));取值
Nosmall 版大,现现身吧
请指教 哪位版主大侠有空指导下 帮楼主顶一下
页:
[1]