在VBA中如何实现AutoCAD中UCS_V(视图)功能?
<P>在VBA中如何实现AutoCAD中UCS_V(视图)功能?</P><P>其要求是,先画好立体图,再转成视图写字等。衷心感谢!</P> Dim str As String<BR>ThisDrawing.SetVariable "cmddia", 0<BR>str = "AMDWGVIEW" & vbCr & vbCr & vbCr & vbCr & vbCr & "V" & vbCr & vbCr & "0,0,0" & vbCr & vbCr<BR>ThisDrawing.SendCommand str<BR>ThisDrawing.SetVariable "cmddia", 1<BR>ThisDrawing.Application.ZoomAll <P>谢谢!我也试成了一种办法,程序如下:</P>
<P>' 设置当前的坐标系为世界坐标系<BR> ThisDrawing.SendCommand "_ucs "<BR> <BR> Utilobj.CreateTypedArray direction, vbDouble, -1, -1, 1<BR> ThisDrawing.ActiveViewport.direction = direction<BR> ThisDrawing.ActiveViewport = ThisDrawing.ActiveViewport<BR> ThisDrawing.SendCommand "ucs" & vbCr & "w "<BR> ThisDrawing.SendCommand "ucs" & vbCr & "v "</P>
<P>ZoomAll</P>
<P> </P>
页:
[1]