明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1659|回复: 3

[求助]关于选择集

[复制链接]
发表于 2007-1-14 21:54:00 | 显示全部楼层 |阅读模式

我想一次选中图内所有图块但用下面的过滤不行:
            If acaddoc.SelectionSets.Count <> 0 Then
                For j = 0 To (acaddoc.SelectionSets.Count - 1)
                    Set Selset = acaddoc.SelectionSets.Item(j)
                    Selset.Delete
                Next j
            End If
            Set Selset = acaddoc.SelectionSets.Add("Sel1")

            Ftype(0) = 0: Fdata(0) = "AcDbBlockReference"
            Dim groupCode As Variant, dataCode As Variant
            groupCode = Ftype: dataCode = Fdata
            Selset.Select acSelectionSetAll, , , groupCode, dataCode
            a = Selset.Count

    块的名称应该为"AcDbBlockReference"还是"BLOCK REFERENCE"?或者是其它的?
下面代码就能选出图内的多段线.

        If acaddoc.SelectionSets.Count <> 0 Then
                For j = 0 To (acaddoc.SelectionSets.Count - 1)
                    Set Selset = acaddoc.SelectionSets.Item(j)
                    Selset.Delete
                Next j
            End If
            Set Selset = acaddoc.SelectionSets.Add("Sel1")

            Ftype(0) = 0: Fdata(0) = "LWPOLYLINE"
            Dim groupCode As Variant, dataCode As Variant
            groupCode = Ftype: dataCode = Fdata
            Selset.Select acSelectionSetAll, , , groupCode, dataCode
            a = Selset.Count

发表于 2007-1-15 08:44:00 | 显示全部楼层
块的名称应该为"insert"
 楼主| 发表于 2007-1-17 22:56:00 | 显示全部楼层
搞对了,非常感谢wyj7485
发表于 2007-5-4 20:59:00 | 显示全部楼层

好啊!

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

本版积分规则

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

GMT+8, 2024-11-26 16:42 , Processed in 0.167669 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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