<?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: Simple list of layer contents in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/simple-list-of-layer-contents/m-p/9560262#M102807</link>
    <description>&lt;P&gt;Yes, I am aware of those tools, however they are severely limiting in my case since they do not look inside blocks or layouts (unless you are in one, and then it does not vet the rest of the drawing). As mentioned, there are hundreds of blocks and dozens of layouts that would need to individually be opened and vetted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dblist gives me the information, but only piecemeal and gives it for every object in the entire drawing (ie a verbose dblist filtered for a single layer would do the trick)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dataextraction sort of works, but is quite the process, and then I need to fiddle with the spreadsheet to get my list. it seems that it would be rather straightforward to have a lisp that runs through the objects in the drawing and spits out the information limited to just the layer of interest - it is way beyond the limits of my coding skills though.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jun 2020 12:58:58 GMT</pubDate>
    <dc:creator>Netelaana</dc:creator>
    <dc:date>2020-06-04T12:58:58Z</dc:date>
    <item>
      <title>Simple list of layer contents</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/simple-list-of-layer-contents/m-p/9558664#M102803</link>
      <description>&lt;P&gt;Can't seem to find any other threads on the topic - if I missed it, please point me in the right direction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an ambiguously named layer with contents spread (presumably) throughout a drawing in various blocks (hundreds), modelspace, and paperspace (dozens of layouts). I would like to find out what is actually on that layer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to get a simple list of the contents of any given layer? something like a pared down dblist but just for a single layer? most helpful would be a list that looks like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ObjectID1 -&amp;nbsp;ObjectType1 - ObjectLocation1(model or layout XXX or block XXX)-ObjectXCoord1-ObjectYCoord1&lt;/P&gt;&lt;P&gt;ObjectID2 - ObjectType1 - ObjectLocation2(model or layout XXX or block XXX)-ObjectXCoord2-ObjectYCoord2&lt;/P&gt;&lt;P&gt;etc...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;even more helpful would be a way to zoom to each object...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;does anything along this vein exist?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 19:36:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/simple-list-of-layer-contents/m-p/9558664#M102803</guid>
      <dc:creator>Netelaana</dc:creator>
      <dc:date>2020-06-03T19:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Simple list of layer contents</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/simple-list-of-layer-contents/m-p/9558878#M102804</link>
      <description>&lt;P&gt;If you have acad 2020+ then you can try the upgraded PURGE command. Newly there is the "Non-Purgeable" tab... with list of objects... even a zoom button is there. Seems like made just&amp;nbsp; for you.&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="Z9E3zK5E_0-1591219481153.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/779465i7B1FEC661F89FE49/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Z9E3zK5E_0-1591219481153.png" alt="Z9E3zK5E_0-1591219481153.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 21:32:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/simple-list-of-layer-contents/m-p/9558878#M102804</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2020-06-03T21:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: Simple list of layer contents</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/simple-list-of-layer-contents/m-p/9559074#M102805</link>
      <description>&lt;P&gt;Sorry , forgot to include that pertinent info - I am running AutoCAD 2018 - no bells or whistles. That does look pretty much like what I am looking for though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any workarounds,lisp, or other options for 2018?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 00:12:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/simple-list-of-layer-contents/m-p/9559074#M102805</guid>
      <dc:creator>Netelaana</dc:creator>
      <dc:date>2020-06-04T00:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Simple list of layer contents</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/simple-list-of-layer-contents/m-p/9559274#M102806</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;for selecting same layer objects you can try &lt;FONT color="#000000"&gt;&lt;STRONG&gt;LAYISO&lt;/STRONG&gt;&lt;/FONT&gt; , &lt;FONT color="#000000"&gt;&lt;STRONG&gt;QSELECT&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp;, &lt;FONT color="#000000"&gt;&lt;STRONG&gt;SELECTSIMILAR&lt;/STRONG&gt;&lt;/FONT&gt; and &lt;STRONG&gt;&lt;FONT color="#000000"&gt;LAYWALK&lt;/FONT&gt;&lt;/STRONG&gt; commands .&amp;nbsp;&lt;/P&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>Thu, 04 Jun 2020 03:44:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/simple-list-of-layer-contents/m-p/9559274#M102806</guid>
      <dc:creator>imadHabash</dc:creator>
      <dc:date>2020-06-04T03:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: Simple list of layer contents</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/simple-list-of-layer-contents/m-p/9560262#M102807</link>
      <description>&lt;P&gt;Yes, I am aware of those tools, however they are severely limiting in my case since they do not look inside blocks or layouts (unless you are in one, and then it does not vet the rest of the drawing). As mentioned, there are hundreds of blocks and dozens of layouts that would need to individually be opened and vetted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dblist gives me the information, but only piecemeal and gives it for every object in the entire drawing (ie a verbose dblist filtered for a single layer would do the trick)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dataextraction sort of works, but is quite the process, and then I need to fiddle with the spreadsheet to get my list. it seems that it would be rather straightforward to have a lisp that runs through the objects in the drawing and spits out the information limited to just the layer of interest - it is way beyond the limits of my coding skills though.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 12:58:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/simple-list-of-layer-contents/m-p/9560262#M102807</guid>
      <dc:creator>Netelaana</dc:creator>
      <dc:date>2020-06-04T12:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: Simple list of layer contents</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/simple-list-of-layer-contents/m-p/9560785#M102808</link>
      <description>&lt;P&gt;Not really sure if this helps, but it was easy enought.. so here you go.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;
(vl-load-com)

(defun c:LayerObjects ( / l c i s e d)
  
  (setq l (getstring "\nLayer name &amp;lt;current&amp;gt;: "))
  (setq c 1000
	i -1)
  
  (if (= l "") (setq l (getvar 'clayer)))
  (or (tblsearch "LAYER" l)
      (prompt "\nError: There is no '" l "' layer in the drawing.")
      (exit))
  
  (if (setq s (ssget "_X" (list (cons 8 l))))
    (repeat (sslength s)
      (setq e (ssname s (setq i (1+ i))))
      (setq d (entget e))
      (princ (strcat "\n"
		     (itoa (setq c (1+ c))) ": " (cdr (assoc 5 d))
		     " - " (strcase (cdr (assoc 0 d)))
		     (if (= (cdr (assoc 0 d)) "INSERT")
		       (strcat ":" (if (vlax-property-available-p (setq o (vlax-ename-&amp;gt;vla-object e)) 'EffectiveName)
				     (vla-get-EffectiveName o)
				     (vla-get-Name o)))
		       "")
		     " - Layout: " (cdr (assoc 410 d))
		     " - " (cond ((vl-princ-to-string (cdr (assoc 10 d)))) (""))))))
  
  (vlax-for b (vla-get-Blocks (vla-get-activeDocument (vlax-get-acad-object)))
    (and (= 0 (vlax-get b 'islayout))
	 (= 0 (vlax-get b 'isxref))
	 (/= "AcDbBlockReference" (vlax-get b 'ObjectName))
	 (vlax-for o b
	   (if (= l (vlax-get o 'Layer))
	     (princ (strcat "\n"
			    (itoa (setq c (1+ c))) ": " (vlax-get o 'Handle)
			    " - " (strcase (substr (vlax-get o 'ObjectName) 5))
			    (if (= (vlax-get o 'ObjectName) "AcDbBlockReference")
			      (strcat ": " (if (vlax-property-available-p o 'EffectiveName)
					     (vla-get-EffectiveName o)
					     (vla-get-Name o)))
			      "")
			    " - " (strcat "InBlock: " (vla-get-Name b))))))))
  (princ)
  )
&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Jun 2020 16:20:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/simple-list-of-layer-contents/m-p/9560785#M102808</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2020-06-04T16:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Simple list of layer contents</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/simple-list-of-layer-contents/m-p/9560786#M102809</link>
      <description>&lt;P&gt;Isolate the layer, select everything visible, and LIST?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 16:21:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/simple-list-of-layer-contents/m-p/9560786#M102809</guid>
      <dc:creator>RobDraw</dc:creator>
      <dc:date>2020-06-04T16:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: Simple list of layer contents</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/simple-list-of-layer-contents/m-p/9561018#M102810</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1779365"&gt;@ВeekeeCZ&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Not really sure if this helps, but it was easy enough.. so here you go.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(vl-load-com)

(defun c:LayerObjects ( / l c i s e d)
  
  (setq l (getstring "\nLayer name &amp;lt;current&amp;gt;: "))
  (setq c 1000
	i -1)
  
  (if (= l "") (setq l (getvar 'clayer)))
  (or (tblsearch "LAYER" l)
      (prompt "\nError: There is no '" l "' layer in the drawing.")
      (exit))
  
  (if (setq s (ssget "_X" (list (cons 8 l))))
    (repeat (sslength s)
      (setq e (ssname s (setq i (1+ i))))
      (setq d (entget e))
      (princ (strcat "\n"
		     (itoa (setq c (1+ c))) ": " (cdr (assoc 5 d))
		     " - " (strcase (cdr (assoc 0 d)))
		     (if (= (cdr (assoc 0 d)) "INSERT")
		       (strcat ":" (if (vlax-property-available-p (setq o (vlax-ename-&amp;gt;vla-object e)) 'EffectiveName)
				     (vla-get-EffectiveName o)
				     (vla-get-Name o)))
		       "")
		     " - Layout: " (cdr (assoc 410 d))
		     " - " (cond ((vl-princ-to-string (cdr (assoc 10 d)))) (""))))))
  
  (vlax-for b (vla-get-Blocks (vla-get-activeDocument (vlax-get-acad-object)))
    (and (= 0 (vlax-get b 'islayout))
	 (= 0 (vlax-get b 'isxref))
	 (/= "AcDbBlockReference" (vlax-get b 'ObjectName))
	 (vlax-for o b
	   (if (= l (vlax-get o 'Layer))
	     (princ (strcat "\n"
			    (itoa (setq c (1+ c))) ": " (vlax-get o 'Handle)
			    " - " (strcase (substr (vlax-get o 'ObjectName) 5))
			    (if (= (vlax-get o 'ObjectName) "AcDbBlockReference")
			      (strcat ": " (if (vlax-property-available-p o 'EffectiveName)
					     (vla-get-EffectiveName o)
					     (vla-get-Name o)))
			      "")
			    " - " (strcat "InBlock: " (vla-get-Name b))))))))
  (princ)
  )&lt;/PRE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Simple maybe (its more than I could have cobbled together)- but nailed it. Thanks!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I might never have found the couple random mleaders someone stuck on this layer buried in a block - with this it took about two seconds....&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 17:31:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/simple-list-of-layer-contents/m-p/9561018#M102810</guid>
      <dc:creator>Netelaana</dc:creator>
      <dc:date>2020-06-04T17:31:45Z</dc:date>
    </item>
  </channel>
</rss>

