明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1326|回复: 3

系统变量设置问题

[复制链接]
发表于 2005-10-19 10:57:00 | 显示全部楼层 |阅读模式

系统变量设置问题:

在VBA中怎么样用程序实现打开捕捉模式,并且设置捕捉X,Y轴的间距,谢谢大家~

具体用OSMODE怎么设置,问题很着急,谢谢大家~~

发表于 2005-10-19 14:00:00 | 显示全部楼层

ThisDrawing.SetVariable "OSMODE", 695

HELP FILE...

Sub Example_SetSnapSpacing()
    ' This example finds the current Snap spacing and changes it.
    
    ' Find the current active viewport
    Dim viewportObj As AcadViewport
    Set viewportObj = ThisDrawing.ActiveViewport
    
    ' Turn on Snap spacing and reset the viewport.
    viewportObj.SnapOn = True
    ThisDrawing.ActiveViewport = viewportObj
    
    ' Find the current Snap spacing
    Dim XSpacing As Double
    Dim YSpacing As Double
    
    viewportObj.GetSnapSpacing XSpacing, YSpacing
    MsgBox "X =" & XSpacing & ", Y =" & YSpacing, Title:="SetSnapSpacing Example"
    
    ' Change the Snap spacing
    XSpacing = XSpacing * 0.5
    YSpacing = YSpacing * 0.5
    viewportObj.SetSnapSpacing XSpacing, YSpacing
    ThisDrawing.ActiveViewport = viewportObj
    MsgBox "X =" & XSpacing & ", Y =" & YSpacing, Title:="SetSnapSpacing Example"
   
End Sub
 楼主| 发表于 2005-10-19 14:28:00 | 显示全部楼层

谢谢斑竹~~

还有一个问题请教:控制极轴捕捉的是哪一个系统变量?

发表于 2005-10-21 11:08:00 | 显示全部楼层
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-27 10:19 , Processed in 0.156663 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表