<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: selection filter on multiple layers in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/selection-filter-on-multiple-layers/m-p/5606467#M55958</link>
    <description>&lt;P&gt;The "," is an illegal (layer) name character. Try creating a new layer using the input "a,b". It will create two layers: a and b.&lt;BR /&gt;Also the "|" is an illegal character, it's reserved to separate the current drawing layername with the Xref layername.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/165499iB95B6806D5F59933/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" title="illegal layer characters.png" alt="illegal layer characters.png" /&gt;&lt;/P&gt;&lt;P&gt;Both methodes&lt;/P&gt;&lt;P&gt;1. Name1, name2&lt;/P&gt;&lt;P&gt;2. OR Name1, Name2, ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can be used to select items from several layers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Apr 2015 06:19:44 GMT</pubDate>
    <dc:creator>SENL1362</dc:creator>
    <dc:date>2015-04-24T06:19:44Z</dc:date>
    <item>
      <title>selection filter on multiple layers</title>
      <link>https://forums.autodesk.com/t5/net-forum/selection-filter-on-multiple-layers/m-p/3431721#M55953</link>
      <description>&lt;P&gt;to select object on a single layer&lt;/P&gt;&lt;PRE&gt;Dim strLayer as string = "road"
acTypValAr.SetValue(New TypedValue(DxfCode.LayerName, strLayer), 2)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;how do you select all objects on multiple layers&lt;/P&gt;&lt;PRE&gt;Dim strLayer as string = "road,sidewalks"
acTypValAr.SetValue(New TypedValue(DxfCode.LayerName, strLayer), 2)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;the above does not work. any suggestions how do you select all objects on multiple layers?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2012 06:35:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/selection-filter-on-multiple-layers/m-p/3431721#M55953</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-04-26T06:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: selection filter on multiple layers</title>
      <link>https://forums.autodesk.com/t5/net-forum/selection-filter-on-multiple-layers/m-p/3431729#M55954</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what is the question or what is not clear? To select all objects on layer "road" and all objects on layer "sidewalks" you can use the statement you showed in the second code-snippet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or do I misinterpret your question?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2012 06:43:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/selection-filter-on-multiple-layers/m-p/3431729#M55954</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2012-04-26T06:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: selection filter on multiple layers</title>
      <link>https://forums.autodesk.com/t5/net-forum/selection-filter-on-multiple-layers/m-p/3431813#M55955</link>
      <description>&lt;P&gt;Try this code, tested on A2009&lt;/P&gt;&lt;PRE&gt;        &amp;lt;CommandMethod("multlayers", CommandFlags.UsePickSet And CommandFlags.Redraw)&amp;gt; _
        Public Sub SortManyLayers()

            Dim doc As Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument

            Dim db As Database = doc.Database

            Dim ed As Editor = doc.Editor

            Dim height As Double = 0.2

            Dim color As Integer = 256

            Dim tid As ObjectId = ObjectId.Null

            Dim ar As New ArrayList()

            Dim tr As Transaction = db.TransactionManager.StartTransaction()

            Using tr

                Try
                    Dim pso As PromptSelectionOptions = New PromptSelectionOptions

                    pso.MessageForRemoval = vbLf + "Select circles only"

                    pso.MessageForAdding = vbLf + "Select circles"

                    Dim tv As TypedValue() = New TypedValue() {New TypedValue(0, "circle"), New TypedValue(8, "0,BORDER-A,BORDER-B,BORDER-E1")}

                    Dim flt As New SelectionFilter(tv)

                    Dim res As PromptSelectionResult

                    res = ed.GetSelection(pso, flt)

                    If res.Status &amp;lt;&amp;gt; PromptStatus.OK Then
                        Return
                    End If

                    Dim sset As SelectionSet = res.Value

                    Dim n As Integer = 0

                    For Each obj As SelectedObject In sset

                        Dim dbobj As DBObject = tr.GetObject(obj.ObjectId, OpenMode.ForRead)

                        Dim circ As Circle = TryCast(dbobj, Circle)

                        If circ IsNot Nothing Then

                            'If n = 0 Then

                            Dim pt As Point3d = circ.Center

                            Dim cid As ObjectId = circ.ObjectId

                            Dim kp As New KeyValuePair(Of ObjectId, Point3d)(cid, pt)

                            ar.Add(kp)

                            'End If
                        End If
                    Next

                    ed.WriteMessage(vbLf &amp;amp; "Count Circles = " + ar.Count.ToString())

                    tr.Commit()


                Catch ex As System.Exception

                    ed.WriteMessage(ex.ToString)
                Finally
                    For Each kp As KeyValuePair(Of ObjectId, Point3d) In ar
                        ed.WriteMessage(vbLf + "ObjectID: {0}" + vbTab + "Center Point: {1}", kp.Key, kp.Value)
                    Next

                End Try

            End Using

        End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800000" face="arial,helvetica,sans-serif"&gt;~'J'~&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2012 07:40:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/selection-filter-on-multiple-layers/m-p/3431813#M55955</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2012-04-26T07:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: selection filter on multiple layers</title>
      <link>https://forums.autodesk.com/t5/net-forum/selection-filter-on-multiple-layers/m-p/3431823#M55956</link>
      <description>&lt;P&gt;Thanks Alfred&lt;/P&gt;&lt;P&gt;I am working way too late into the night.&lt;/P&gt;&lt;P&gt;In this case I need to wipe the egg of my face.&lt;img id="smileyembarrassed" class="emoticon emoticon-smileyembarrassed" src="https://forums.autodesk.com/i/smilies/16x16_smiley-embarrassed.png" alt="Smiley Embarassed" title="Smiley Embarassed" /&gt;&lt;/P&gt;&lt;P&gt;I had an error in&amp;nbsp; my code in regards to my layer name, spelling. UG!!!!!!.....sorry.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so yes "Road,Sidewalks" will select all objects on layer Roads and objects on layer Sidewalks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2012 07:53:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/selection-filter-on-multiple-layers/m-p/3431823#M55956</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-04-26T07:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: selection filter on multiple layers</title>
      <link>https://forums.autodesk.com/t5/net-forum/selection-filter-on-multiple-layers/m-p/5606367#M55957</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I"m not expert, but i'm not sure that it will. how will autocad know that the comma acts as an OR operator (||)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kean W has answered your exact question in a comment in the post below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://through-the-interface.typepad.com/through_the_interface/2008/05/finding-all-the.html"&gt;http://through-the-interface.typepad.com/through_the_interface/2008/05/finding-all-the.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;gluckand i hope this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BK&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2015 03:13:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/selection-filter-on-multiple-layers/m-p/5606367#M55957</guid>
      <dc:creator>BKSpurgeon</dc:creator>
      <dc:date>2015-04-24T03:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: selection filter on multiple layers</title>
      <link>https://forums.autodesk.com/t5/net-forum/selection-filter-on-multiple-layers/m-p/5606467#M55958</link>
      <description>&lt;P&gt;The "," is an illegal (layer) name character. Try creating a new layer using the input "a,b". It will create two layers: a and b.&lt;BR /&gt;Also the "|" is an illegal character, it's reserved to separate the current drawing layername with the Xref layername.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/165499iB95B6806D5F59933/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" title="illegal layer characters.png" alt="illegal layer characters.png" /&gt;&lt;/P&gt;&lt;P&gt;Both methodes&lt;/P&gt;&lt;P&gt;1. Name1, name2&lt;/P&gt;&lt;P&gt;2. OR Name1, Name2, ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can be used to select items from several layers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2015 06:19:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/selection-filter-on-multiple-layers/m-p/5606467#M55958</guid>
      <dc:creator>SENL1362</dc:creator>
      <dc:date>2015-04-24T06:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: selection filter on multiple layers</title>
      <link>https://forums.autodesk.com/t5/net-forum/selection-filter-on-multiple-layers/m-p/5606699#M55959</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All string value in selection filter TypedValueS as DxfCode.LayerName (8), DxfCode.Start (0), DxfCode.BlockName (2), and so on, can use wildcard patterns.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a look at the help docs:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://help.autodesk.com/view/ACD/2016/ENU/?guid=GUID-3C1A759C-BB88-41A7-B1DE-697C493C92C8" target="_blank"&gt;http://help.autodesk.com/view/ACD/2016/ENU/?guid=GUID-3C1A759C-BB88-41A7-B1DE-697C493C92C8&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2015 11:35:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/selection-filter-on-multiple-layers/m-p/5606699#M55959</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2015-04-24T11:35:18Z</dc:date>
    </item>
  </channel>
</rss>

