楼上的,你的程序有问题,通过坐标选择的时候应该输入三维坐标变量,由Pline的Coordinates 属性得到是二维坐标,你改成这样就行了
。。。。。。
Set ss = ThisDrawing.SelectionSets.Add("tt") Coord = obj.Coordinates '获取顶点坐标数组 ReDim pArray(0 To UBound(Coord) + (UBound(Coord) + 1) / 2) As Double Dim j As Integer For i = 0 To UBound(Coord) pArray(i) = Coord(i) Next i For i = 1 To (UBound(Coord) + 1) / 2 For j = UBound(pArray) To i * 3 - 1 Step -1 pArray(j) = pArray(j - 1) Next pArray(i * 3 - 1) = obj.Elevation Next Call ss.SelectByPolygon(acSelectionSetFence, pArray)
。。。。。。
这样做就是人为的增加一个Z轴坐标值。。。。。。^_^ |