本帖最后由 作者 于 2006-3-18 14:58:23 编辑
引用这里的TlsSel类
dispbbs.asp?boardid=4&star=1&replyid=78298&id=28869&skin=0&page=1- Sub test123()
- Dim ss As New TlsSel
- Dim i As AcadLayer
- zxxNames = "ACAD_ISO04W100"
- ss.Init
- ss.SetFilter -4, "<or", 6, zxxNames
- For Each i In ThisDrawing.Layers
- If InStr(zxxNames, i.LineType) <> 0 Then
- ss.AppendFilter -4, "<and", 8, i.Name, 6, "bylayer", -4, "and>"
- End If
- Next
- ss.AppendFilter -4, "or>"
- ss.Selectobject acSelectionSetAll
- MsgBox ss.Count
- End Sub
其中 zxxNames是你的线型名,如果有多个用逗号隔开
|