明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3701|回复: 1

上述选择集代码中,后两个参数有问题,哪个大侠帮忙,看下有什么问题,如何解决

[复制链接]
发表于 2007-4-24 10:01:00 | 显示全部楼层 |阅读模式

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

发表于 2009-2-6 19:19:00 | 显示全部楼层

类型不对吧

Variant,不是object

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-12-23 10:08 , Processed in 0.169372 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表