gaobin888 发表于 2006-1-7 17:01:00

vb中怎样得到当前活动的文档

<FONT color=#000000>是用AcadDocument,能否举个例子</FONT><FONT color=#000000></FONT>

songzhi 发表于 2006-1-7 23:47:00

<P>Sub t()<BR>&nbsp; Dim a As AcadApplication<BR>&nbsp; Dim b As AcadDocument<BR>&nbsp; <BR>&nbsp; set b=a.ActiveDocument</P>
<P>&nbsp; MsgBox "The active document is: " &amp; b.name, vbInformation,&nbsp; _</P>
<P>&nbsp;&nbsp;&nbsp; "ActiveDocument Example"&nbsp;</P>
<P>&nbsp; set&nbsp;b=Nothing</P>
<P>&nbsp; set a=Nothing<BR>&nbsp; <BR>End Sub<BR></P>

gaobin888 发表于 2006-1-12 08:30:00

<P>谢谢</P>
页: [1]
查看完整版本: vb中怎样得到当前活动的文档