- UID
- 19573
- 积分
- 366
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-12-9
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2004-2-24 11:56:33
|
显示全部楼层
那么请问帮助中的例子
Sub Example_SelectByPolygon()
' This example adds entities to a selection set by defining a polygon.
Dim ssetObj As AcadSelectionSet
Set ssetObj = ThisDrawing.SelectionSets.Add("TEST_SSET2")
' Add all the entities that lie within a fence to the selection set
Dim mode As Integer
Dim pointsArray(0 To 11) As Double
mode = acSelectionSetFence
pointsArray(0) = 28.2: pointsArray(1) = 17.2: pointsArray(2) = 0
pointsArray(3) = -5: pointsArray(4) = 13: pointsArray(5) = 0
pointsArray(6) = -3.3: pointsArray(7) = -3.6: pointsArray(8) = 0
pointsArray(9) = 28: pointsArray(10) = -3: pointsArray(11) = 0
ssetObj.SelectByPolygon mode, pointsArray
' Add all the Circles that lie within fence to the selection set
ReDim gpCode(0 To 1) As Integer
gpCode(0) = 0
gpCode(1) = 10
Dim pnt(0 To 2) As Double
pnt(0) = 3: pnt(1) = 6: pnt(2) = 0
ReDim dataValue(0 To 1) As Variant
dataValue(0) = "Circle"
dataValue(1) = pnt
Dim groupCode As Variant, dataCode As Variant
groupCode = gpCode
dataCode = dataValue
ssetObj.SelectByPolygon mode, pointsArray, groupCode, dataCode
End Sub
中groupCode, dataCode两个参数是怎么定义的,他的数值(如pnt,0,10)代表什么,能给介绍一下吗.谢谢 |
|