心之缘 发表于 2006-6-10 10:32:00

为何我的对话框程序不能运行(菜鸟问题)

<P>弱弱地问一下:</P>

<P></P>
<P></P>

心之缘 发表于 2006-6-10 10:45:00

加载vlisp程序后,CAD老提示QUIT/EXIT ABORT,不知是什么原因?

xxsheng 发表于 2006-6-10 13:21:00

<FONT face="Courier New" color=#ff0000>(</FONT><A href="http://www.mjtd.com/object/autolisp/if.htm" target="_blank" ><FONT face="Courier New" color=blue>if</FONT></A><FONT face="Courier New" color=red>(</FONT><A href="http://www.mjtd.com/object/autolisp/60.htm" target="_blank" ><FONT face="Courier New" color=blue>&lt;</FONT></A><FONT face="Courier New" color=red>(</FONT><A href="http://www.mjtd.com/object/autolisp/setq.htm" target="_blank" ><FONT face="Courier New" color=blue>setq</FONT></A><FONT face="Courier New"> index <FONT color=red>(</FONT></FONT><A href="http://www.mjtd.com/object/autolisp/load_dialog.htm" target="_blank" ><FONT face="Courier New" color=blue>load_dialog</FONT></A><FONT face="Courier New"> <FONT color=#ff00ff>"e:xuanze"</FONT><FONT color=red>)</FONT><FONT color=red>)</FONT>0<FONT color=red>)</FONT><FONT color=red>(</FONT></FONT><A href="http://www.mjtd.com/object/autolisp/exit.htm" target="_blank" ><FONT face="Courier New" color=blue>exit</FONT></A><FONT face="Courier New"><FONT color=red>)</FONT><FONT color=red>)</FONT><BR><FONT color=#ff00ff>e:xuanze,,,,,路径是这么写的?</FONT></FONT>

心之缘 发表于 2006-6-10 16:38:00

<P>呵呵,我也不知道啊~</P>
<P>我对这个一点都不懂</P>
<P>请指点迷津!</P>

ZZXXQQ 发表于 2006-6-11 00:17:00

这是对话框文件未找到。应该用FINDFILE函数寻找对话框文件。如:
(defun c:xuanze ()
(IF (SETQ NM (FINDFILE "XUANZE.DCL")) (PROGN
(IF (> (setq id (load_dialog NM)) 0) (PROGN
   (if (new_dialog "xuanze" id) (PROGN
    (action_tile "yes" "(hijk)")
    (action_tile "no" "(clear)")
    (SETQ RE (start_dialog))
   )
    (PRINC "\nUnable to display dialog box! 无法显示对话框!")
   )
   (unload_dialog id)
)
   (PRINC "\nUnable to load dialog box! 无法装载对话框!")
)
)
(PRINC "\nCon't fount dialog file! 未找到对话框文件!")
)
(princ)
)

心之缘 发表于 2006-6-11 11:22:00

<P>谢谢!</P>
<P>还是找不到对话框文件,怎么办?</P>
<P>是不是路径不对啊??</P>

koer_csq 发表于 2006-6-11 14:55:00

<P>最简单的方法就是反两个文件都在autoCAD的“支持搜索文件路径”中</P>
<P><FONT face="Courier New" color=#ff0000>把(</FONT><A href="http://www.mjtd.com/object/autolisp/load_dialog.htm" target="_blank" ><FONT face="Courier New" color=blue>load_dialog</FONT></A><FONT face="Courier New"> <FONT color=#ff00ff>"e:xuanze"</FONT><FONT color=red>)改成(<A href="http://www.mjtd.com/object/autolisp/load_dialog.htm" target="_blank" ><FONT color=blue>load_dialog</FONT></A><FONT color=#000000> </FONT><FONT color=#ff00ff>"xuanze"</FONT><FONT color=red>)就可以了</FONT></FONT></FONT></P>
<P>&nbsp;</P>

心之缘 发表于 2006-6-11 15:30:00

<P>真的,放在CAD指定的路径就可以呀</P>
<P>现在没有问题了,就是我还有一点不明白,之前我也把E盘也设在搜索路径中,却不行啊~</P>
<P>谢谢<A name=18535><FONT color=#000066><B>koer_csq</B></FONT></A> 和<A name=18442><FONT color=#0000ff><B>ZZXXQQ</B></FONT></A></P>
<P>为了这个对话框我已经寝食难安好几天了</P>

心之缘 发表于 2006-6-11 17:07:00

<P>还有个问题</P>
<P>就是<FONT face="Courier New" color=#ff0000>(</FONT><A href="http://www.mjtd.com/object/autolisp/action_tile.htm" target="_blank" ><FONT face="Courier New" color=blue>action_tile</FONT></A><FONT face="Courier New"> <FONT color=#ff00ff>"yes"</FONT> <FONT color=#ff00ff>"<FONT color=red>(</FONT>hijk<FONT color=red>)</FONT>"</FONT><FONT color=red>)中的hijk 也找不到,该怎么办啊?</FONT></FONT></P>
<P><FONT face="Courier New"><BR>&nbsp;</P></FONT>

ZZXXQQ 发表于 2006-6-11 21:49:00

<P>hijk是你自定义的函数呀!是要你自己写的。你应该写在xuanze.lsp文件中。</P>
页: [1] 2 3
查看完整版本: 为何我的对话框程序不能运行(菜鸟问题)