- Sub newselt(ByVal Ptt1 As Object, ByVal Ptt2 As Object)
- myCad.ActiveDocument.Utility.Prompt("请等待...")
- '创建选择集
- On Error GoTo ERROR_HANDLER
- sset = CreateSSet("ss1")
- Dim mode As Integer
- mode = AcSelect.acSelectionSetCrossing
- Dim gpCode(0) As Object
- Dim dataValue(0) As Object
- gpCode(0) = 0
- dataValue(0) = "LINE"
- gpCode(0) = -4
- dataValue(0) = "<Or"
- gpCode(1) = -4
- dataValue(1) = "<And"
- gpCode(2) = 0
- dataValue(2) = "LINE"
- gpCode(3) = -4
- dataValue(3) = "And>"
- gpCode(4) = -4
- dataValue(4) = "<And"
- gpCode(5) = 0
- dataValue(5) = "POLYLINE"
- gpCode(6) = -4
- dataValue(6) = "And>"
复制代码- gpCode(7) = -4
- dataValue(7) = "<And"
- gpCode(8) = 0
- dataValue(8) = "LWPOLYLINE"
- gpCode(9) = -4
- dataValue(9) = "And>"
复制代码- gpCode(10) = -4
- 'dataValue(10) = "Or>"
复制代码- Dim groupCode As Object, dataCode As Object
- groupCode = gpCode
- dataCode = dataValue
- sset.Select(mode, Ptt1, Ptt2,groupCode,dataCode)
- MsgBox(sset.Count)
- Exit Sub
- ERROR_HANDLER:
- MsgBox("Error In GetIntersectionPoints: " & Err.Number & ", " & Err.Description)
- End Sub
- 上述代码中sset.Select(mode, Ptt1, Ptt2,groupCode,dataCode)内后两个参数有问题,如取消就可运行,但没法过滤不要的东西,哪个大侠帮忙,看下有什么问题,急急急………………………………
复制代码 |