cheng0212 发表于 2006-3-18 09:06:00

(求助)我刚刚学习vba,请大家帮帮我一个问题

<P>我刚刚编写了一个小程序,我想在<FONT face="Times New Roman">cad</FONT>用一个命令<FONT face="Times New Roman">mycy</FONT>调用它,请大家帮帮我<FONT face="Times New Roman"> </FONT>。</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt">它的路径是<FONT face="Times New Roman">: D:\Program Files\AutoCAD 2002\Support</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman">vba</FONT>工程是<FONT face="Times New Roman">mycy.dvb</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt">模块是<FONT face="Times New Roman">mouldcy </FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt">过程是<FONT face="Times New Roman">drawcy</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman">&nbsp;<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman">&nbsp;<o:p></o:p></FONT></P>
<P>先谢谢大家了</P>

xqyhome 发表于 2006-3-18 10:25:00

<P>acad.lsp</P>
<P>(vl-vbaload (findfile "<FONT face="Times New Roman">mycy.</FONT>dvb"))<BR>(defun C:<FONT face="Times New Roman">mycy</FONT>() <BR>(setvar "cmdecho" 0)<BR>&nbsp; (vl-vbarun "<FONT face="Times New Roman">drawcy</FONT>") <BR>(setvar "cmdecho" 1)<BR>&nbsp; (princ) <BR>) </P>

路边 发表于 2006-3-19 20:37:00

<P>好</P>
<P>&nbsp;</P>

cheng0212 发表于 2006-3-21 08:53:00

非常感谢你啊

<P>谢谢你&nbsp; 啊 </P>
<P>我的可以用了</P>
页: [1]
查看完整版本: (求助)我刚刚学习vba,请大家帮帮我一个问题