<?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: Batch rename layer lisp in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/8727228#M142883</link>
    <description>&lt;P&gt;Thats fine..Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 12 Apr 2019 18:18:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-04-12T18:18:55Z</dc:date>
    <item>
      <title>Batch rename layer lisp</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/8726933#M142876</link>
      <description>&lt;P&gt;Hi, I am looking for a lisp to rename over 500 layers to add an extension to them. Rename is too slow for this.&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;BR /&gt;Tony&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 16:16:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/8726933#M142876</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-12T16:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Batch rename layer lisp</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/8727034#M142877</link>
      <description>&lt;P&gt;Here's one from autocad tips website:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;;This routine will place a Suffix at the end of all Layer names and rename them.
 
;Of course, it will not rename Layer "0" or "Defpoints".
 

(defun C:LRN ( / acadDocument theLayers layName pre)
 
(vl-load-com)
 
(setq pre (getstring "\nEnter Layer Suffix : "))
 
(setq acadDocument (vla-get-activedocument (vlax-get-acad-object)))
 
(setq theLayers (vla-get-layers acadDocument))
 
(vlax-map-collection theLayers 'layer-mod)
 
(princ)
 
);defun
 
(defun layer-mod (theLayer)
 
(setq layName (vlax-get-property theLayer 'Name))
 
(if (not (member layName '("0" "Defpoints")))
 
(vla-put-Name thelayer (strcat layName pre))
 
) ;if
 
);defun
 
(princ)&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Apr 2019 16:53:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/8727034#M142877</guid>
      <dc:creator>user181</dc:creator>
      <dc:date>2019-04-12T16:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Batch rename layer lisp</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/8727051#M142878</link>
      <description>&lt;P&gt;Thanks, me being a bit unsure how do I use this?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 16:59:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/8727051#M142878</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-12T16:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Batch rename layer lisp</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/8727058#M142879</link>
      <description>&lt;P&gt;Copy and paste into a notepad document. save it with a name and .lsp extension (newname.lsp)&amp;nbsp; then use appload command to load it into cad or just drag and drop the .lsp file into autocad drawing area. use LRN at command line to start it. Then follow command line and enter layer suffix and then hit enter&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 17:06:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/8727058#M142879</guid>
      <dc:creator>user181</dc:creator>
      <dc:date>2019-04-12T17:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: Batch rename layer lisp</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/8727072#M142880</link>
      <description>&lt;P&gt;Awesome...Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 17:07:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/8727072#M142880</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-12T17:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: Batch rename layer lisp</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/8727075#M142881</link>
      <description>&lt;P&gt;Is there a way to keep the old layers and add the new?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 17:11:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/8727075#M142881</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-12T17:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: Batch rename layer lisp</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/8727089#M142882</link>
      <description>&lt;P&gt;It would need some modification.&amp;nbsp; You could post it in the lisp and customization forum&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bd-p/130" target="_blank" rel="noopener"&gt;HERE&lt;/A&gt;&amp;nbsp;and see if someone could modify it. I am unable to modify it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 17:18:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/8727089#M142882</guid>
      <dc:creator>user181</dc:creator>
      <dc:date>2019-04-12T17:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Batch rename layer lisp</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/8727228#M142883</link>
      <description>&lt;P&gt;Thats fine..Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 18:18:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/8727228#M142883</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-12T18:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: Batch rename layer lisp</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/9730253#M142884</link>
      <description>&lt;P&gt;is there a way to identify when the lisp routine chooses to put the suffix at the end.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to modify this so it will add it to the beginning.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 16:51:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/9730253#M142884</guid>
      <dc:creator>Rpunturi</dc:creator>
      <dc:date>2020-09-04T16:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Batch rename layer lisp</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/9730278#M142885</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;;This routine will place a Prefix at the beginning of all Layer names and rename them.
 
;Of course, it will not rename Layer "0" or "Defpoints".
 

(defun C:LRN ( / acadDocument theLayers layName pre)
 
(vl-load-com)
 
(setq pre (getstring "\nEnter Layer Suffix : "))
 
(setq acadDocument (vla-get-activedocument (vlax-get-acad-object)))
 
(setq theLayers (vla-get-layers acadDocument))
 
(vlax-map-collection theLayers 'layer-mod)
 
(princ)
 
);defun
 
(defun layer-mod (theLayer)
 
(setq layName (vlax-get-property theLayer 'Name))
 
(if (not (member layName '("0" "Defpoints")))
 
(vla-put-Name thelayer (strcat pre layName))
 
) ;if
 
);defun
 
(princ)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 04 Sep 2020 17:02:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/9730278#M142885</guid>
      <dc:creator>user181</dc:creator>
      <dc:date>2020-09-04T17:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Batch rename layer lisp</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/9742160#M142886</link>
      <description>&lt;P&gt;works perfectly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you. Very helpful.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 12:25:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/batch-rename-layer-lisp/m-p/9742160#M142886</guid>
      <dc:creator>Rpunturi</dc:creator>
      <dc:date>2020-09-11T12:25:42Z</dc:date>
    </item>
  </channel>
</rss>

