上述选择集代码中,后两个参数有问题,哪个大侠帮忙,看下有什么问题,如何解决
<p> Sub newselt(ByVal Ptt1 As Object, ByVal Ptt2 As Object)<br/> myCad.ActiveDocument.Utility.Prompt("请等待...")<br/> '创建选择集<br/> On Error GoTo ERROR_HANDLER<br/> sset = CreateSSet("ss1")<br/> Dim mode As Integer<br/> mode = AcSelect.acSelectionSetCrossing<br/> Dim gpCode(10) As Object<br/> Dim dataValue(10) As Object<br/> gpCode(0) = -4<br/> dataValue(0) = "<Or"<br/> gpCode(1) = -4<br/> dataValue(1) = "<And"<br/> gpCode(2) = 0<br/> dataValue(2) = "LINE"<br/> gpCode(3) = -4<br/> dataValue(3) = "And>"</p><p> gpCode(4) = -4<br/> dataValue(4) = "<And"<br/> gpCode(5) = 0<br/> dataValue(5) = "POLYLINE"<br/> gpCode(6) = -4<br/> dataValue(6) = "And>"</p><p> gpCode(7) = -4<br/> dataValue(7) = "<And"<br/> gpCode(8) = 0<br/> dataValue(8) = "LWPOLYLINE"<br/> gpCode(9) = -4<br/> dataValue(9) = "And>"</p><p> gpCode(10) = -4<br/> dataValue(10) = "Or>"</p><p> Dim groupCode As Object, dataCode As Object<br/> groupCode = gpCode<br/> dataCode = dataValue<br/> sset.Select(mode, Ptt1, Ptt2, groupCode , dataCode )<br/> MsgBox(sset.Count)</p><p> Exit Sub<br/>ERROR_HANDLER:<br/> MsgBox("Error In GetIntersectionPoints: " & Err.Number & ", " & Err.Description)<br/> End Sub</p><p>上述选择集代码中,sset.Select(mode, Ptt1, Ptt2, groupCode , dataCode ),运行时后两个参数有问题,哪位大虾帮忙看下,有什么问题,如何解决,急急急…………………………<br/></p> <p>类型不对吧</p><p>Variant,不是object</p>
页:
[1]