VB 二次开发autocad2008中,请问如何利用VB控制获得捕捉?例如:我用VB写程序捕捉某弧度的圆心的坐标

 我来答
aeo000000
2013-05-25 · TA获得超过1006个赞
知道小有建树答主
回答量:561
采纳率:0%
帮助的人:234万
展开全部
ActiveDocument.SetVariable Name, Value
===========================
不懂看帮助呀,下面是帮助里的:

Sub Example_SetVariable()
' This example sets various system variables, each of
' a different data type.

Dim sysVarName As String
Dim sysVarData As Variant
Dim DataType As Integer

' Set FILEDIA system variable (data type Integer) to 1. NOTE that
' you need to declare a variable as the data type of system variable,
' assign data to that variable and then make it variant type
Dim intData As Integer
sysVarName = "FILEDIA"
intData = 1
sysVarData = intData ' Integer data
ThisDrawing.SetVariable sysVarName, sysVarData

' Check the variable using GetVariable
sysVarData = ThisDrawing.GetVariable(sysVarName)
MsgBox sysVarName & " = " & sysVarData, , "SetVariable Example"

' Set DCTCUST system variable (data type String) to "My Custom Dictionary"
Dim strData As String
sysVarName = "DCTCUST"
strData = "My Custom Dictionary"
sysVarData = strData ' String data
ThisDrawing.SetVariable sysVarName, sysVarData

' Check the variable using GetVariable
sysVarData = ThisDrawing.GetVariable(sysVarName)
MsgBox sysVarName & " = " & sysVarData, , "SetVariable Example"

' Set CHAMFERA system variable (data type Double) to 1.5
Dim dataDouble As Double
sysVarName = "CHAMFERA"
dataDouble = 1.5
sysVarData = dataDouble ' Double data
ThisDrawing.SetVariable sysVarName, sysVarData
' Check the variable using GetVariable
sysVarData = ThisDrawing.GetVariable(sysVarName)
MsgBox sysVarName & " = " & sysVarData, , "SetVariable Example"

' Set INSBASE system variable (data type array) to (1.0,1.0,0)
Dim arrayData3D(0 To 2) As Double
sysVarName = "INSBASE"
arrayData3D(0) = 1#: arrayData3D(1) = 1#: arrayData3D(2) = 0
sysVarData = arrayData3D ' 3D array data
ThisDrawing.SetVariable sysVarName, sysVarData
' Check the variable using GetVariable
sysVarData = ThisDrawing.GetVariable(sysVarName)
MsgBox sysVarName & " = " & sysVarData(0) & ", " & sysVarData(1) & ", " & sysVarData(2), , "SetVariable Example"

End Sub
==========================================
再查一下系统变量 "osmode" ,查一下什么值代表什么意思。
0



1

END(端点)

2

MID(中点)

4

CEN(圆心)

8

NOD(节点)

16

QUA(象限点)

32

INT(交点)

64

INS(插入点)

128

PER(垂足)

256

TAN(切点)

512

NEA(最近点)

1024

清除所有对象捕捉

2048

APP(外观交点)

4096

EXT(延伸)

8192

PAR(平行)
岁寒鱼
2013-05-23 · TA获得超过704个赞
知道小有建树答主
回答量:277
采纳率:100%
帮助的人:86.9万
展开全部
(setvar "osmode" 4)
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式