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(10) As Object Dim dataValue(10) As Object 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 ),运行时后两个参数有问题,哪位大虾帮忙看下,有什么问题,如何解决,急急急…………………………
|