求助!opendcl模态对话框只能在一个图形空间使用!如何解决?
用opendcl制作了一个模态的对话框,在单个图形空间用lisp调用能够成功,但是当CAD打开多张图纸的时候,只能再某一张图中使用(为第一次使用这个对话框的图纸),切换图纸后再另外的图纸中不能使用,返回之前能使用的图纸还是能使用。在关掉这张能使用的图纸后,在后续图纸中仍然能在其中一张图纸中使用。多CAD也只能再一个CAD中的一张图纸中使用!!!附源码
(defun ou-srwz (mrwz /)
(setq textb mrwz)
(setq texta mrwz)
(command "opendcl")
(dcl_project_import '
("YWt6A/UdAABlPEhRBuKTJzUxLT9qQDtW/d6cdfOvOp11a8rIHr46HQI7O9f0L20zajQHJz6d1Q/9"
"RTYm1k9PWMQOn6x5WEBs6cSv41WdvGEenE1Q6obUmTKlBZECvhPfHtSs2MmNs+dHTQmwCcDH4zD3"
"g/QvnO0J6ETW/6SWegf2ljtAL38B9Rfv4YIqO18kM/Mqt/O0h6S61uw1a4JwDgNHqSmMySaVh2OY"
"QF+4QKO5sdNVnD27uh1thdXcFNCJD5EEkM34BagNVY9mmCThiC2zNjR/UPvGO/4D+4r2H6PA/nS7"
"17ImwRjvjC4wbM8XvFdEuyCrTeTo0jPmqyC0W7k1C6cQBuxPS7O4pbqAtrjEg32+cX+heYJ9uJXY"
"An1RSljgoWNADhawu6ytWyPpUMqSKbFzVdcs+QnI1uGaM15xpRn6FlOnb0M8jxtGPD/Qpbp1qb+1"
"Zth215U4QSwZfkHfwlqozQJziM144JNIkAiAykwQm49dAkO5TS4g8ZeRxZ/RprMh7hQ2O7OHFkS2"
"NGs0qzTa/QlZ8aPekQIOLJruzHycXrplXzrQy2oPBa7IhXoFs34Ir6mgtWm8BQpeHdRxvAGxuJw4"
"M3qiH4zGUaIF1lDWYKUdwHnssOggVZJHFFFNE8Wi5qQTnQBQ10NI8HQAdUolclrQ+9rWf4UwvsV+"
"kX7yyiB01Z7ehwe/Oz7BQt6xI86heAJ5jtNqCvEmjfedHf6l04cHQDZCRL+geMZpuAURowFigcyl"
"lYWBfoOhJ9xvufXegTkFQAyvl07/dS166x9EmpZqVDRJ+xVSf++Kc69PMNq40vS/6VLyP1Tndzw0"
"5kzsrW/Dp5VYYGTF9TmvUNTdh4IXr7Rpn4wYwEitfofGfABijK882AIie4dG5jxAyjqovAbntHkH"
"sodwPTBILlxDWuZEPrVOQwwxjB3w2r8OCfReothnrNu1F2M7R2VlhwVlk9vzgkJdMUIbYmjFOOAL"
"tAZ8t+T0OuXTKDPb0GcPji2TW1AallntcnS23olkaUwWgcs+8K9YvWym0fk/cFf/ULBnNGntWmcq"
"ZVlnQJjbmR1N6V2Wl2EtOxUZ5FAWvrAqxvGRRLTVze8wlSuUmgsn808nTqoEcKAFAolkraMVbteN"
"RJtTZQjPHEz7lW12KSH0I5Lxdqk2CE8322cs7SBUhzlVzsw1Gz0e8exnpmVupt0BHx5NL0WBxqQv"
"eMWsMj+X2yweCizXXBVKzPGyKqRz1yqC4dssHkLrVv0qVG9KXuvCuFfaZ+PHPTu5pxlCWB2ETtlP"
"YjvC0pUXsXj/VIvmfIv0Mv/ENJB868s5bzz4XNcnQZ7aEGE1LdSO0/xfAv5juWqhnj4lpY8+BcY5"
"qC2feYk2cVzUHqIqqiZ/nUTWDO8y1GJplOo/lrR/UfmP4Xy4/fB7uANUBXGXmhGAr8SsEKGhmzAz"
"kw3KcafVH4BYS3VEB9FV2e0C60GRSq8itqRcVfZE5TQpWdnZkUwIIqnJzuS1ATvl5lPch7NnYfwC"
"MDnxZR6gQ/5xfnB9OEPBeIaOYaiFWA1CB4N46B3y2w==")
)
(dcl_form_show wnbjq_tt1)
)
(defun c:wnbjq_tt1_OnInitialize (/)
(dcl_Control_GetPos wnbjq_tt1)
(dcl_Control_SetText ou-sub-TT mrwz)
(dcl_Control_GetEnabled ou-sub-TT)
(dcl_Control_SetProperty ou-sub-TT "TEXT" mrwz)
(if (vl-registry-read "HKEY_CURRENT_USER\\Software\\Autodesk\\AutoCAD\\ouyang_crtk\\ListDCL\\ListDCLediter"
"sfzh"
)
(dcl_Control_SetValue wnbjq_tt1_sfbj (atoi (vl-registry-read "HKEY_CURRENT_USER\\Software\\Autodesk\\AutoCAD\\ouyang_crtk\\ListDCL\\ListDCLediter"
"sfzh"
)
)
)
(progn
(dcl_Control_SetValue wnbjq_tt1_sfbj 1)
(vl-registry-write "HKEY_CURRENT_USER\\Software\\Autodesk\\AutoCAD\\ouyang_crtk\\ListDCL\\ListDCLediter"
"sfzh" "1"
)
)
)
)
(defun c:wnbjq_tt1_sfbj_OnClicked (Value /)
(vl-registry-write "HKEY_CURRENT_USER\\Software\\Autodesk\\AutoCAD\\ouyang_crtk\\ListDCL\\ListDCLediter"
"sfzh" "0"
)
)
(defun c:wnbjq_tt1_sfbj_OnDblClicked (/)
(vl-registry-write "HKEY_CURRENT_USER\\Software\\Autodesk\\AutoCAD\\ouyang_crtk\\ListDCL\\ListDCLediter"
"sfzh" "1"
)
)
(defun c:wnbjq_tt1_TT_OnEditChanged (NewValue /)
(setq texta NewValue)
)
(defun c:wnbjq_tt1_OK_OnClicked (/)
(setq texta (dcl_Control_GetText ou-sub-TT))
(vl-registry-write "HKEY_CURRENT_USER\\Software\\Autodesk\\AutoCAD\\ouyang_crtk\\ListDCL\\ListDCLediter"
"sfzh" (itoa (dcl_Control_GetValue wnbjq_tt1_sfbj))
)
(dcl_Form_Close wnbjq_tt1)
;;;(dcl_Project_Unload "wnbjq" )
)
(defun c:wnbjq_tt1_OnOK (/)
(setq texta (dcl_Control_GetText ou-sub-TT))
(vl-registry-write "HKEY_CURRENT_USER\\Software\\Autodesk\\AutoCAD\\ouyang_crtk\\ListDCL\\ListDCLediter"
"sfzh" (itoa (dcl_Control_GetValue wnbjq_tt1_sfbj))
)
(dcl_Form_Close wnbjq_tt1)
;;;(dcl_Project_Unload "wnbjq" )
)
(defun c:wnbjq_tt1_OnCancel (/)
(setq texta nil)
(dcl_Form_Close wnbjq_tt1)
;;;(dcl_Project_Unload "wnbjq" )
)
(defun c:wnbjq_tt1_Cancel_OnClicked (/)
(setq texta nil)
(dcl_Form_Close wnbjq_tt1)
;;;(dcl_Project_Unload "wnbjq" )
)
(defun c:wnbjq_tt1_TextButton1_OnClicked (/)
(setq texta (strcat texta "%%130"))
(dcl_Control_SetText ou-sub-TT texta)
)
(defun c:wnbjq_tt1_TextButton2_OnClicked (/)
(setq texta (strcat texta "%%131"))
(dcl_Control_SetText ou-sub-TT texta)
)
(defun c:wnbjq_tt1_TextButton3_OnClicked (/)
(setq texta (strcat texta "%%132"))
(dcl_Control_SetText ou-sub-TT texta)
)
(defun ou-sub-zsth (wz th yy /)
(while (wcmatch wz (strcat "*" yy "*"))
(if (= yy "[*]")
(setq wz (vl-string-subst th "*" wz))
(setq wz (vl-string-subst th yy wz))
)
)
wz
)
怎么没有人回答? 初步找到原因是在探索者环境下只能在一个图形空间中激活ondocActived。纯CAD和天正环境下正常!不知道有高手知道怎么解决不? 模态就是对一个窗口启作用,你要制作一个非模态对话框,用ODCL很容易 是有提示某个函数未定义吗? 没用任何提示,最后解决办法,将(command “opendcl”)默认加载,就解决了
页:
[1]