明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1135|回复: 7

在指定的图层中,选择Line实体?

[复制链接]
发表于 2008-12-1 15:13 | 显示全部楼层 |阅读模式

(ssget '((8 . "你要指定的图层名称")))只能选择指定图层的所有实体。

请问

如何选择指定图层如objTextLayer上的Line实体?

"觉得好,就打赏"
还没有人打赏,支持一下
发表于 2008-12-1 15:16 | 显示全部楼层
(ssget '((0 . "line") (8 . "objTextLayer"))
发表于 2008-12-1 15:52 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2008-12-1 15:57 | 显示全部楼层

唉 可惜你的用法不对

发表于 2008-12-1 16:02 | 显示全部楼层
liminnet发表于2008-12-1 15:52:00拍马屁的时候来啦(sssget '((-4 . <OR) (8 . 0) (-4 . OR>) (-4 . <OR) (0 . LINE) (-4 . OR>)))

nonsmall发表于2008-12-1 15:57:00唉 可惜你的用法不对

哈哈 平时大家知道都没说出来,你那功力是一流的

当自己承认的时候却......

呵呵  没别的意思   娱乐娱乐下   继续正题~~

发表于 2008-12-1 16:43 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2008-12-1 18:11 | 显示全部楼层
呵呵,有可能狂刀的易工具不处理这些简单的东西。
 楼主| 发表于 2008-12-9 15:53 | 显示全部楼层
本帖最后由 作者 于 2008-12-9 16:08:48 编辑

liminnet发表于2008-12-1 15:52:00拍马屁的时候来啦(sssget '((-4 . <OR) (8 . 0) (-4 . OR>) (-4 . <OR) (0 . LINE) (-4 . OR>)))

用了and方法

Sub l()
  Dim sSet As AcadSelectionSet
  Dim fType(3) As Integer, fData(3) As Variant
  Dim sSetName As String
  sSetName = "First"
  With ConnectCad
    With .ActiveDocument
      On Error Resume Next
      If Not IsNull(.SelectionSets.Item(sSetName)) Then
        Set sSet = .SelectionSets.Item(sSetName)
        sSet.Delete
      End If
      Set sSet = .SelectionSets.Add(sSetName)
    End With
    fType(0) = -4: fData(0) = "<And"
    fType(2) = 0: fData(2) = "Line"
   
    fType(1) = 8: fData(1) = "标题栏"
    fType(3) = -4: fData(3) = "And>"
    sSet.Select 5, , , fType, fData
    sSet.Erase
    'Debug.Print sSet.Count
  End With
End Sub

用or选8图层 再连上or选0图元的方法

Sub l()
  Dim sSet As AcadSelectionSet
  Dim fType(6) As Integer, fData(6) As Variant
  Dim sSetName As String
  sSetName = "First"
  With ConnectCad
    With .ActiveDocument
      On Error Resume Next
      If Not IsNull(.SelectionSets.Item(sSetName)) Then
        Set sSet = .SelectionSets.Item(sSetName)
        sSet.Delete
      End If
      Set sSet = .SelectionSets.Add(sSetName)
    End With
    fType(0) = -4: fData(0) = "<Or"
    fType(1) = 8: fData(1) = "标题栏"
    fType(2) = -4: fData(2) = "Or>"
    fType(3) = -4: fData(3) = "<Or"
    fType(4) = 0: fData(4) = "Line"
    'fType(5) = -4: fData(5) = "Or>"
    'fType(6) = -4: fData(6) = "Or<"
    fType(5) = 0: fData(5) = "Text"
    fType(6) = -4: fData(6) = "Or>"
    'fType(6) = -4: fData(6) = "And>"
    sSet.Select 5, , , fType, fData
   
    Debug.Print sSet.Count
    sSet.Erase
  End With
End Sub

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

本版积分规则

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

GMT+8, 2024-6-3 19:08 , Processed in 0.168594 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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