翔羽 发表于 2005-10-19 10:57:00

系统变量设置问题

<P>系统变量设置问题:</P>
<P>在VBA中怎么样用程序实现打开捕捉模式,并且设置捕捉X,Y轴的间距,谢谢大家~</P>
<P>具体用OSMODE怎么设置,问题很着急,谢谢大家~~</P>

alin 发表于 2005-10-19 14:00:00

<P>ThisDrawing.SetVariable "OSMODE", 695</P>
<P>HELP FILE...</P><PRE class=Code>Sub Example_SetSnapSpacing()
    ' This example finds the current <FONT style="BACKGROUND-COLOR: #316ac5" color=#ffffff>Snap spacing</FONT> and changes it.
   
    ' Find the current active viewport
    Dim viewportObj As AcadViewport
    Set viewportObj = ThisDrawing.ActiveViewport
   
    ' Turn on <FONT style="BACKGROUND-COLOR: #316ac5" color=#ffffff>Snap spacing</FONT> and reset the viewport.
    viewportObj.SnapOn = True
    ThisDrawing.ActiveViewport = viewportObj
   
    ' Find the current <FONT style="BACKGROUND-COLOR: #316ac5" color=#ffffff>Snap spacing</FONT>
    Dim XSpacing As Double
    Dim YSpacing As Double
   
    viewportObj.GetSnapSpacing XSpacing, YSpacing
    MsgBox "X =" &amp; XSpacing &amp; ", Y =" &amp; YSpacing, Title:="SetSnapSpacing Example"
   
    ' Change the <FONT style="BACKGROUND-COLOR: #316ac5" color=#ffffff>Snap spacing</FONT>
    XSpacing = XSpacing * 0.5
    YSpacing = YSpacing * 0.5
    viewportObj.SetSnapSpacing XSpacing, YSpacing
    ThisDrawing.ActiveViewport = viewportObj
    MsgBox "X =" &amp; XSpacing &amp; ", Y =" &amp; YSpacing, Title:="SetSnapSpacing Example"
   
End Sub</PRE>

翔羽 发表于 2005-10-19 14:28:00

<P>谢谢斑竹~~</P>
<P>还有一个问题请教:控制极轴捕捉的是哪一个系统变量?</P>

MJTD_7777 发表于 2005-10-21 11:08:00

<A href="http://bbs.mjtd.com/forum.php?mod=viewthread&tid=43341" target="_blank" >http://bbs.mjtd.com/forum.php?mod=viewthread&tid=43341</A>
页: [1]
查看完整版本: 系统变量设置问题