baysmy 发表于 2005-10-17 20:10:00

正交模式的设置,怪了

用程序设置绘图模式为正交模式,是不是用这句啊,<font color="#000080">ThisDrawing.ActiveViewport.OrthoOn = True,怎么就不好使呢?<br>各位给看看!<br></font>

alin 发表于 2005-10-17 22:57:00

<P>看看帮助文件</P>
<P>Once changes have been completed, the viewport must be reset as the active viewport for the changes to appear. To reset the active viewport, simply call the ActiveViewport property again with the updated Viewport object. </P>
<P>Sub Example_<FONT style="BACKGROUND-COLOR: #316ac5" color=#ffffff>OrthoOn</FONT>()<BR>&nbsp;&nbsp;&nbsp; ' This example toggles the setting of <FONT style="BACKGROUND-COLOR: #316ac5" color=#ffffff>OrthoOn</FONT>.<BR><BR>&nbsp;&nbsp;&nbsp; Dim viewportObj As AcadViewport<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; ' Set the viewportObj variable to the activeviewport<BR>&nbsp;&nbsp;&nbsp; Set viewportObj = ThisDrawing.ActiveViewport<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; ' Display the current setting of <FONT style="BACKGROUND-COLOR: #316ac5" color=#ffffff>OrthoOn</FONT><BR>&nbsp;&nbsp;&nbsp; MsgBox "Isometric snap mode is: " &amp; IIf(viewportObj.<FONT style="BACKGROUND-COLOR: #316ac5" color=#ffffff>OrthoOn</FONT>, "On", "Off"), , "<FONT style="BACKGROUND-COLOR: #316ac5" color=#ffffff>OrthoOn</FONT> Example"<BR><BR>&nbsp;&nbsp;&nbsp; ' Toggle the setting of <FONT style="BACKGROUND-COLOR: #316ac5" color=#ffffff>OrthoOn</FONT><BR>&nbsp;&nbsp;&nbsp; viewportObj.<FONT style="BACKGROUND-COLOR: #316ac5" color=#ffffff>OrthoOn</FONT> = Not (viewportObj.<FONT style="BACKGROUND-COLOR: #316ac5" color=#ffffff>OrthoOn</FONT>) ' Reset the active viewport to see the change on the AutoCAD status bar ThisDrawing.ActiveViewport = viewportObj MsgBox "Isometric snap mode is now: " &amp; IIf(viewportObj.<FONT style="BACKGROUND-COLOR: #316ac5" color=#ffffff>OrthoOn</FONT>, "On", "Off"), , "<FONT style="BACKGROUND-COLOR: #316ac5" color=#ffffff>OrthoOn</FONT> Example"<BR>&nbsp;&nbsp;&nbsp; <BR>End Sub</P>

baysmy 发表于 2005-10-18 09:49:00

我把这段程序运行了一下,还是不好用阿,正交模式还是不变啊

alin 发表于 2005-10-18 10:05:00

Probably you have misundertood the OrthoOn property. OrthoOn property specifices the status of the Isometric snap mode for the viewport. It is different from Orthomode. You should set the system variable of "ORTHOMODE" to change orthomode.

idoo 发表于 2007-1-18 23:37:00

我也有同样问题啊~~~~具体怎么写??

idoo 发表于 2007-2-10 19:42:00

<p>怎么操作啊????</p><p>用程序设置绘图模式为正交模式,是不是用这句啊,<font color="#000080">ThisDrawing.ActiveViewport.OrthoOn = True,怎么就不好使呢?<br/>各位给看看!<br/></font></p>

idoo 发表于 2007-4-2 15:14:00

<p>不行,解决不了,还望高手指点啊!</p>

mccad 发表于 2007-4-2 20:53:00

直接设置系统变量ORTHOMODE的值
页: [1]
查看完整版本: 正交模式的设置,怪了