- UID
- 49113
- 积分
- 0
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2003-5-13
- 最后登录
- 1970-1-1
|
发表于 2003-5-27 18:41:39
|
显示全部楼层
[code]
Sub Example_SelectAtPoint()
' This example adds objects to a selection set by identifying a point.
' At first all objects at the point are added to the selection set. Then
' only circle objects at the point are added to the selection set.
' Create the selection set
Dim ssetObj As AcadSelectionSet
Set ssetObj = ThisDrawing.SelectionSets.Add("TEST_SSET1")
' Add to the selection set all the objects that lie at point(6.8,9.4,0)
Dim point(0 To 2) As Double
point(0) = 6.8: point(1) = 9.4: point(2) = 0
ssetObj.SelectAtPoint point
' Add to the selection set all the Circles that lie at point (6.8,9.4,0)
Dim gpCode(0) As Integer
Dim dataValue(0) As Variant
gpCode(0) = 0
dataValue(0) = "Circle"
Dim groupCode As Variant, dataCode As Variant
groupCode = gpCode
dataCode = dataValue
ssetObj.SelectAtPoint point, groupCode, dataCode
End Sub
[code]
object.SelectAtPoint Point, FilterType, FilterData
Object
SelectionSet
The object or objects this method applies to.
Point
Variant (three-element array of doubles); input-only
The 3D WCS coordinates specifying the point to use for the selection.
FilterType
Integer; input-only; optional
A DXF group code specifying the type of filter to use.
FilterData
Variant; input-only; optional
The value to filter on.
但执行结果和公司的说明不一样,只能选到1个 |
|