|
怎样获取选择集内点的坐标
On Error Resume Next
Dim FilterType As Variant '
Dim FilterData As Variant '
Dim Fdata(0) As Variant '
Dim Ftype(0) As Integer '
Dim XYH As Variant
Dim Sel As AcadSelectionSet '选择集
Dim Obj As AcadObject '
Dim Fill As String
Fill = "D:\xyh.dat"
Open Fill For Output As #1
Set Sel = ThisDrawing.SelectionSets.Add("ssel")
If Err Then
Err.Clear
ThisDrawing.SelectionSets("ssel").Delete
Set Sel = ThisDrawing.SelectionSets.Add("ssel")
End If
Ftype(0) = 0
Fdata(0) = "Point"
FilterType = Ftype
FilterData = Fdata
Sel.Select acSelectionSetAll, , , FilterType, FilterData
For Each Obj In Sel
If Obj.ObjectName = "Point" Then '如果是点则输入到文件
XYH = Point '这里应该怎样编写程序
Print #1, XYH(0); " ,"; XYH(1); " ,"; XYH(2)
End If
Next
Close #1
|
|