[求助]选择集问题
<p>我图形中有的图元包含如下的扩展数据<br/>Dim datatype(0 To 7) As Integer<br/>Dim data(0 To 7) As Variant<br/>datatype(0) = 1001: data(0) = ""<br/>datatype(1) = 1000: data(1) = jfh<br/>datatype(2) = 1003: data(2) = "0"<br/>datatype(3) = 1040: data(3) = 1.232<br/>datatype(4) = 1041: data(4) = 100’此处有时候为100,有时候为0<br/>datatype(5) = 1070: data(5) = jfid<br/>datatype(6) = 1071: data(6) = zdh + 1<br/>datatype(7) = 1042: data(7) = 10<br/>ty.SetXData datatype, data<br/>ThisDrawing.Application.Update</p><p>我想构建扩展数据里data(4) = 100的图元的选择集,可怎么总是出错呀?请高手指点<br/>下面是我的代码<br/>Sub pd()<br/>On Error Resume Next<br/>Dim p1(0 To 2) As Double<br/>Dim p2(0 To 2) As Double<br/>Dim fType, fData As Variant<br/>'p1(0) = 100<br/>'p1(1) = 100<br/>'p1(2) = 0<br/>'p2(0) = 500<br/>'p2(1) = 500<br/>'p2(2) = 0<br/>Dim x, y As Double<br/>Dim dh As Long<br/>fType(0) = 1041: fData(0) = 100<br/>'ftype(1) = 2: fdata(1) = "界址圈"<br/>'Call CreateSSetFilter(fType, fData, 1041, 100)<br/>'tyxzj.Select acSelectionSetAll, , , fType, fData<br/>Dim ggdxzj As AcadSelectionSet<br/>If Not IsNull(ThisDrawing.SelectionSets.Item("jzq")) Then<br/> Set ggdxzj = ThisDrawing.SelectionSets.Item("jzq")<br/> ggdxzj.Delete<br/>End If<br/>Set ggdxzj = ThisDrawing.SelectionSets.Add("jzq")<br/>ggdxzj.Select acSelectionSetAll, , , fType, fData<br/>'ggdxzj.Select acSelectionSetWindow, p1, p2<br/>'tyxzj.Select acSelectionSetAll, , , ftype, fdata<br/>End Sub</p>
页:
[1]