[求助] SelectAtPoint 选择不到"点"
<p>Private Sub CommandButton1_Click()<br/> '在CAD中绘两个点,用直线将两个点连接<br/> '选择直线,然后将直线起点处的"点"移动到直线的中间。<br/> <br/> Me.Hide<br/> <br/> Dim Seel As AcadSelectionSet '选择集<br/> Set Seel = CreateSelectionSet '创建选择集<br/> <br/> Dim StartPoint As Variant<br/> Dim EndPoint As Variant<br/> Dim TemPoint As Variant<br/> <br/> Dim FType(0) As Integer<br/> Dim FData(0) As Variant<br/> FType(0) = 0<br/> FData(0) = "Line"<br/> FilterType = FType<br/> FilterData = FData<br/> <br/> Seel.SelectOnScreen FilterType, FilterData<br/> TemPoint = Seel.Item(0).StartPoint<br/> Seel.Delete<br/> <br/> FType(0) = 0<br/> FData(0) = "Point"<br/> FilterType = FType<br/> FilterData = FData<br/> Set Seel = CreateSelectionSet <font color="#22dd48"> '创建选择集<br/></font> Seel.SelectAtPoint TemPoint, FilterType, FilterData<br/> <font color="#ff0000">ObjNum = Seel.Count </font><font color="#11ee11">'这里 选择集为空 没有选择到"点"<br/></font>End Sub<br/></p> 不懂 TemPoint这个位置根本就没有点对象,当然选择集为空了。
页:
[1]