<?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: List of layers from nested filter list in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/9885331#M67373</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3182440"&gt;@nathanwheeler27&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;That prints the names of every group and filter which is great. But I am realizing I need to research dictionaries and practice mapcar/lambda more because I barely understand how.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":sad_but_relieved_face:"&gt;😥&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From this point, &lt;STRONG&gt;can it add a list of the layers&lt;/STRONG&gt; in that &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;group&lt;/STRONG&gt;&lt;/FONT&gt;/&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;filter&lt;/FONT&gt; &lt;/STRONG&gt;after?&lt;/P&gt;
&lt;P&gt;So ("Group name" ("Layer1" "Layer2" ....))&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Possibly &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;YES&lt;/STRONG&gt;&lt;/FONT&gt;, definitely &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;NOT&lt;/FONT&gt;&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Possibly you can dig into dictionaries to get a group layer list. But if you do the same for property filters... all you'll find are definitions of property conditions. Something like the lower. Then you will need to &lt;STRONG&gt;translate&lt;/STRONG&gt; them to something that LISP understands and then apply them in right order... not worth it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;"NAME==\"_SO 8##\" OR NAME==\"_PS ###\" OR NAME==\"Layer*\""
"OFF==\"False\" AND FROZEN==\"False\""&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 21 Nov 2020 09:47:30 GMT</pubDate>
    <dc:creator>ВeekeeCZ</dc:creator>
    <dc:date>2020-11-21T09:47:30Z</dc:date>
    <item>
      <title>List of layers from nested filter list</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/9882369#M67369</link>
      <description>&lt;P&gt;Hi, I am struggling to find a way to retrieve a list of layers from a specific filter or group that is nested in another group or filter. See image below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nathanwheeler27_0-1605835555744.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/846482iC1432E9BE0E123AD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nathanwheeler27_0-1605835555744.png" alt="nathanwheeler27_0-1605835555744.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I need to retrieve layers from, for example, 2_STRUCTURAL (Group) -&amp;gt; S - FLOOR FRAMING (Filter) -&amp;gt; S - FF - 1 (Filter)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":upside_down_face:"&gt;🙃&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the information already provided by everyone in this thread, I figured out how to do it for unested groups/filters.&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/retrieve-layer-names-from-group-layer-filter/td-p/8805768" target="_blank"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/retrieve-layer-names-from-group-layer-filter/td-p/8805768&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can this be done?&lt;/P&gt;&lt;P&gt;I have some work arounds, but it will be tedious and it won't automatically find new layers if there added.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 01:31:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/9882369#M67369</guid>
      <dc:creator>nathanwheeler27</dc:creator>
      <dc:date>2020-11-20T01:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: List of layers from nested filter list</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/9882908#M67370</link>
      <description>&lt;P&gt;This lists all filters and groups.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun :LayerFilterList (/ :SubFilterList)

  (defun :SubFilterList (dict / ent lst)
    (foreach ent (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 350)) dict))
      (setq lst (append lst
                        (cons ent (if (assoc 360 (entget ent))
                                    (:SubFilterList (entget (cdr (assoc 360 (entget (cdr (assoc 360 (entget ent)))))))))))))
    lst)

  (mapcar '(lambda (x) (cdr (assoc 300 (entget x))))
          (:SubFilterList (dictsearch
                            (vlax-vla-object-&amp;gt;ename
                              (vla-getextensiondictionary
                                (vla-get-layers
                                  (vla-get-activedocument
                                    (vlax-get-acad-object)))))
                            "ACLYDICTIONARY"))))
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 08:14:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/9882908#M67370</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2020-11-20T08:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: List of layers from nested filter list</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/9884644#M67371</link>
      <description>&lt;P&gt;That prints the names of every group and filter which is great. But I am realizing I need to research dictionaries and practice mapcar/lambda more because I barely understand how.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":sad_but_relieved_face:"&gt;😥&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From this point, can it add a list of the layers in that group/filter after?&lt;/P&gt;&lt;P&gt;So ("Group name" ("Layer1" "Layer2" ....))&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 22:08:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/9884644#M67371</guid>
      <dc:creator>nathanwheeler27</dc:creator>
      <dc:date>2020-11-20T22:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: List of layers from nested filter list</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/9884792#M67372</link>
      <description>&lt;P&gt;"mapcar" applies a function to each element of the supplied list. A few examples will make it easier to understand.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;(setq lst (list 1 2 3 4))&lt;BR /&gt;(setq lst (mapcar '1+ lst))&lt;/P&gt;&lt;P&gt;Result: (2 3 4 5)&lt;BR /&gt;&lt;BR /&gt;It is the same as writing:&lt;BR /&gt;(setq lst (list (1+ (car lst)) (1+ (cadr lst)) (1+ (caddr lst)) (1+ (cadddr lst))))&lt;BR /&gt;&lt;BR /&gt;You can also write your own function, to use with mapcar:&lt;BR /&gt;(defun Add2 (x) (+ x 2))&lt;BR /&gt;&lt;BR /&gt;(setq lst (list 1 2 3 4))&lt;/P&gt;&lt;P&gt;(setq lst (mapcar 'Add2 lst))&lt;/P&gt;&lt;P&gt;Result: (3 4 5 6)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This brings us to "lambda". Lambda is an anonymous function. It's a function without a name, that is used in place. Instead of defining an "Add2" function, you can write a lambda function in place:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(setq lst (list 1 2 3 4))&lt;/P&gt;&lt;P&gt;(setq lst (mapcar '(lambda (x) (+ x 2)) lst))&lt;BR /&gt;Result: (3 4 5 6)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;There is a bit more to it, but no need to make things complicated right now. If u get this basic principle down, you can easily expand on your own.&lt;BR /&gt;&lt;BR /&gt;Mapcar - takes each element of the list (one at a time) and runs them through the supplied function.&lt;/P&gt;&lt;P&gt;Lambda - you can look at it as a "defun" with no name. It's a function that is used on the spot.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 23:51:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/9884792#M67372</guid>
      <dc:creator>doaiena</dc:creator>
      <dc:date>2020-11-20T23:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: List of layers from nested filter list</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/9885331#M67373</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3182440"&gt;@nathanwheeler27&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;That prints the names of every group and filter which is great. But I am realizing I need to research dictionaries and practice mapcar/lambda more because I barely understand how.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":sad_but_relieved_face:"&gt;😥&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From this point, &lt;STRONG&gt;can it add a list of the layers&lt;/STRONG&gt; in that &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;group&lt;/STRONG&gt;&lt;/FONT&gt;/&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;filter&lt;/FONT&gt; &lt;/STRONG&gt;after?&lt;/P&gt;
&lt;P&gt;So ("Group name" ("Layer1" "Layer2" ....))&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Possibly &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;YES&lt;/STRONG&gt;&lt;/FONT&gt;, definitely &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;NOT&lt;/FONT&gt;&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Possibly you can dig into dictionaries to get a group layer list. But if you do the same for property filters... all you'll find are definitions of property conditions. Something like the lower. Then you will need to &lt;STRONG&gt;translate&lt;/STRONG&gt; them to something that LISP understands and then apply them in right order... not worth it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;"NAME==\"_SO 8##\" OR NAME==\"_PS ###\" OR NAME==\"Layer*\""
"OFF==\"False\" AND FROZEN==\"False\""&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Nov 2020 09:47:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/9885331#M67373</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2020-11-21T09:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: List of layers from nested filter list</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/9885985#M67374</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1166654"&gt;@doaiena&lt;/a&gt;&amp;nbsp;@Thank you for those examples.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1779365"&gt;@ВeekeeCZ&lt;/a&gt;&amp;nbsp;hmm, okay. I am probably going to switch all my filters to groups if I can figure out how to get the layers out of them.&amp;nbsp;&lt;BR /&gt;Alternatively, I do have a lisp function that returns the filters conditions which could be used to recreate the layer list in that properties group instead. That just sounds complicated though &lt;span class="lia-unicode-emoji" title=":face_with_rolling_eyes:"&gt;🙄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Nov 2020 18:56:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/9885985#M67374</guid>
      <dc:creator>nathanwheeler27</dc:creator>
      <dc:date>2020-11-21T18:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: List of layers from nested filter list</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/9886151#M67375</link>
      <description>&lt;P&gt;What are you going to do with that?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW, how much these property filters differ from project to project? Do you really need to read them and translate them? I mean, the pattern remains the same, or similar..., right? So the rules could be just hard-coded. Actually that is what I do.&amp;nbsp;&lt;/P&gt;
&lt;DIV id="gtx-trans" style="position: absolute; left: 55px; top: 89.2px;"&gt;
&lt;DIV class="gtx-trans-icon"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sat, 21 Nov 2020 20:57:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/9886151#M67375</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2020-11-21T20:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: List of layers from nested filter list</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/9886167#M67376</link>
      <description>&lt;P&gt;My project template has 153 total layers in it. Originally I was just going to hard code the groups and all their layers into the routine. But, if a layer name changes down the road or occasionally a drafter adds a layer(s) to a project, I would then have to manually fix that in the code. This seemed so much more convenient if I could get it to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the current function I am making, it will turn off all layers and turn on the layers in a specified group.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Nov 2020 21:15:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/9886167#M67376</guid>
      <dc:creator>nathanwheeler27</dc:creator>
      <dc:date>2020-11-21T21:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: List of layers from nested filter list</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/9886219#M67377</link>
      <description>&lt;P&gt;I believe this is it!&lt;/P&gt;&lt;P&gt;The below code will get every group set and make a list of all their layers, including nested groups.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(defun :LayerFilterList (/ :SubFilterList)

  (defun :SubFilterList (dict / ent lst)
    (foreach ent (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 350)) dict))
        (setq lst 
            (append lst
                (cons ent 
                    (if (assoc 360 (entget ent))
                                    (:SubFilterList (entget (cdr (assoc 360 (entget (cdr (assoc 360 (entget ent))))))))
                    ) ; if
                ) ; cons
            ) ; append
        ) ; setq
    ) ; foreach
    lst)

    (setq dlist (:SubFilterList (dictsearch
                            (vlax-vla-object-&amp;gt;ename
                              (vla-getextensiondictionary
                                (vla-get-layers
                                  (vla-get-activedocument
                                    (vlax-get-acad-object)))))
                            "ACLYDICTIONARY")))

    (mapcar 
        '(lambda (x) 
            (cons (setq i (cdr (assoc 300 (entget x))))
                    (mapcar '(lambda (y) (cdr (assoc 2 (entget (cdr y)))))
					    (vl-remove-if '(lambda (z) (/= 330 (car z))) (entget x))
				    ) ; mapcar
            )
        )
        dlist
    )
)

(princ (assoc "S - ROOF - 1" (:LayerFilterList)))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Princ:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(S - ROOF - 1 (nil nil 0 TB DEFPOINTS TEXT Dimensions 1 - S - Windows 1 - S - TEXT - ROOF 1 - S - Roof 1 - S - Roof Framing 1 - S - Walls - I 1 - S - Walls - E 1 - S - Section 1 - S - Roof Beams 1 - S - Walls - HATCH 1 - S - Roof Posts NOTES 1 - S - Shearwalls Posts))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Nov 2020 22:31:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/9886219#M67377</guid>
      <dc:creator>nathanwheeler27</dc:creator>
      <dc:date>2020-11-21T22:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: List of layers from nested filter list</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/14080029#M170719</link>
      <description>&lt;P&gt;Hi BeekeeCZ,&lt;/P&gt;&lt;P&gt;Great lisp and i am using it for a long time now.&lt;/P&gt;&lt;P&gt;But i was wondering it its possible to make that list having the same tree form as layer filters' tree. Also each filter paired with its name.&lt;/P&gt;&lt;P&gt;Think thats the solution for exporting the tree and importing to another drawing.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Apr 2026 05:27:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/14080029#M170719</guid>
      <dc:creator>prountzos509</dc:creator>
      <dc:date>2026-04-07T05:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: List of layers from nested filter list</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/14080031#M170720</link>
      <description>&lt;P&gt;Hi BeekeeCZ,&lt;/P&gt;&lt;P&gt;Great lisp (as always). Using it for a long time now.&lt;/P&gt;&lt;P&gt;I was wondering if its possible to get the list with the same tree form as Layer Filters have.&lt;/P&gt;&lt;P&gt;Also (in pairs) each filter name along with its properties (dxf 301).&lt;/P&gt;&lt;P&gt;Then create lines with upper filter name, filter name and its properties, so it can be exported to file and then imported to another drawing.&lt;/P&gt;&lt;P&gt;Couldnt reach the first step so i am looking for help from the master.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Apr 2026 05:34:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/14080031#M170720</guid>
      <dc:creator>prountzos509</dc:creator>
      <dc:date>2026-04-07T05:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: List of layers from nested filter list</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/14080565#M170726</link>
      <description>&lt;P&gt;Here's some to play with.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;;; returns list of pairs, CAR is a list of nested filter names, CDR is filter definition eg. 

;; ((("Level1b" "All") . "NAME==\"TEst*\"")
;;  (("Level2" "Level1a" "All") . "NAME==\"Le*\" OR NAME==\"t*\" OR FROZEN==\"False\" OR LOCKED==\"False\"")
;;  (("Level1a" "All") . "NAME==\"Layer*\" OR NAME==\"Te**\""))

(defun LayerFilterList2 (/ :FilterPropList out) 
    
  (defun :FilterPropList (lst / nams ent)
    
    (foreach pair lst
      
      (setq ent (cdr pair) 
	    nams (cons (cdr (assoc 300 (entget ent))) (car pair)) 
	    out (cons (cons nams (cdr (assoc 301 (entget ent))))
		      out))
      
      (if (assoc 360 (entget ent))
	(:FilterPropList (mapcar '(lambda (x) (cons nams x))
				 (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 350)) (entget (cdr (assoc 360 (entget (cdr (assoc 360 (entget ent))))))))))))))
  
  (:FilterPropList (mapcar '(lambda (x) (cons (list "&lt;STRONG&gt;All&lt;/STRONG&gt;") x))  				; All is language sensitive, must be translated to current loval version.
			   (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 350))
					  (dictsearch (vlax-vla-object-&amp;gt;ename (vla-getextensiondictionary (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))))) "ACLYDICTIONARY")))))
  
  out)
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that "All" as a top level filter name could be translated to localized language ACAD version.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 233px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1631406iE873499089C44A9D/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Apr 2026 13:57:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/14080565#M170726</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2026-04-07T13:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: List of layers from nested filter list</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/14080601#M170727</link>
      <description>&lt;P&gt;Also, here's an example how such import/export routine could work. Older routine from&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.augi.com/showthread.php?97438-Can-I-create-frequently-used-layer-filters-in-LISP&amp;amp;p=952247&amp;amp;viewfull=1#post952247" target="_blank" rel="noopener"&gt;https://forums.augi.com/showthread.php?97438-Can-I-create-frequently-used-layer-filters-in-LISP&amp;amp;p=952247&amp;amp;viewfull=1#post952247&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Apr 2026 15:18:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/14080601#M170727</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2026-04-07T15:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: List of layers from nested filter list</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/14082462#M170740</link>
      <description>&lt;P&gt;Thanks (again) BeeKeeCZ.&amp;nbsp; The list is similar to filter tree form, especially if you reverse out. I can make lines with name, parent, and properties. Reverse list lists parents above lower lever filters, which prevents errors when creating multiple filters with tree form.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2026 17:48:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-layers-from-nested-filter-list/m-p/14082462#M170740</guid>
      <dc:creator>prountzos509</dc:creator>
      <dc:date>2026-04-08T17:48:43Z</dc:date>
    </item>
  </channel>
</rss>

