在VB中如何使用ThisDrawing.SendCommand
<P><FONT size=2>在autocad的VBA中可以使用ThisDrawing.SendCommand指令</FONT></P><P><FONT size=2>ThisDrawing.SendCommand "_UCS" & vbCr & "y" & vbCr & ""</FONT></P>
<P><FONT size=2>问:</FONT></P>
<P><FONT size=2>在VB中,这条语句如何改??</FONT></P>
<P><FONT size=2>???+SendCommand "_UCS" & vbCr & "y" & vbCr & ""就能实现上述语句的功能.</FONT></P>
<P><FONT size=2>谢谢</FONT></P> <P>On Error Resume Next<BR>Dim acadapp As AcadApplication<BR>Set acadapp = GetObject(, "autocad.application")<BR>If Err Then<BR> Err.Clear<BR> Set acadapp = CreateObject("autocad.application")<BR> acadapp.Visible = True<BR> If Err Then<BR> MsgBox Err.Description<BR> Exit Sub<BR> End If<BR>End If<BR>Dim acaddoc As AcadDocument<BR>Set acaddoc = acadapp.ActiveDocument</P>
<P>acaddoc.sendcommand <FONT size=2>"_UCS" & vbCr & "y" & vbCr & ""</FONT></P> 谢谢,我会按你的思路试一下。
页:
[1]