|
发表于 2002-10-7 21:33:00
|
显示全部楼层
下午起床后又做了2个小时,
selectPointAt()总是不争气,只选择一条。
没办法只好曲线救国啦。
用**********slectcro sd********
yo在这个“小盒子里”真是太难编辑了。我换。。。Public Sub selectAtPoint()
Dim vSelectPoint As Variant
Dim selectPoint(2) As Double
Dim corner1 As Variant
Dim corner2 As Variant
Dim precious As Double
Dim utilObj As Object
Dim selection As AcadSelectionSet
Dim i As Integer
Dim Line As AcadLine
Set selection = ThisDrawing.ActiveSelectionSet
Set utilObj = ThisDrawing.Utility
vSelectPoint = utilObj.GetPoint(, "select the test point")
selectPoint(0) = vSelectPoint(0)
selectPoint(1) = vSelectPoint(1)
precious = 0.0000000000001 '模拟点的精度。
utilObj.CreateTypedArray corner1, vbDouble, (selectPoint(0) - precious), (selectPoint(1) + precious), 0
utilObj.CreateTypedArray corner2, vbDouble, (selectPoint(0) + precious), (selectPoint(1) - precious), 0
selection.Select acSelectionSetCrossing, corner1, corner2
For i = 0 To selection.Count - 1
Set Line = selection.Item(i)
Line.Color = acBlue
Line.Update
Next
End Sub |
|