为什么一定要等到窗体关闭以后所创建的实体才在图中出现
<P>新建一个窗体,加一个按钮CommandButton1,事件如下</P><P>Private Sub CommandButton1_Click()<BR> Dim varpnt As Variant<BR> Me.Hide<BR> varpnt = ActiveDocument.Utility.GetPoint(, "请给出圆心")<BR> ActiveDocument.ModelSpace.AddCircle varpnt, 10<BR> Me.show<BR>End Sub</P>
<P>在图中拾取圆心之后,所建的圆并没有在图中出现,而是需要等到窗体关闭</P>
<P>除了ActiveDocument.Regen acActiveViewport以外,请问还有没有更好的办法?</P> <P>Private Sub CommandButton1_Click()<BR> Dim varpnt As Variant</P>
<P> dim pcircle As AcadCircle </P>
<P><BR> Me.Hide<BR> varpnt = ActiveDocument.Utility.GetPoint(, "请给出圆心")<BR> set pcircle = ActiveDocument.ModelSpace.AddCircle(varpnt, 10)</P>
<P> pcircle.update</P>
<P><BR> Me.show<BR>End Sub</P> <P>谢谢</P>
页:
[1]