<?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: Lisp to change all text on a layer  to same word in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-all-text-on-a-layer-to-same-word/m-p/9637682#M72119</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;It worked! Thanks for saving me so much time!&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":clinking_beer_mugs:"&gt;🍻&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jul 2020 20:03:32 GMT</pubDate>
    <dc:creator>ronjonp</dc:creator>
    <dc:date>2020-07-15T20:03:32Z</dc:date>
    <item>
      <title>Lisp to change all text on a layer  to same word</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-all-text-on-a-layer-to-same-word/m-p/9637520#M72115</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm looking for a lisp that will allow me to select all text on a personnel layer and change all the text to the same word.&amp;nbsp; Ex. I have "100 different personnel names" and I'd like to change all of them to&amp;nbsp; say"WS".&amp;nbsp; Is this possible?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 18:27:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-all-text-on-a-layer-to-same-word/m-p/9637520#M72115</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-15T18:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change all text on a layer  to same word</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-all-text-on-a-layer-to-same-word/m-p/9637531#M72116</link>
      <description>&lt;P&gt;Sure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:foo (/ s)
  (if (setq s (ssget ":L" '((0 . "TEXT") (8 . "personnel"))))
    (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
      (entmod (append (entget e) '((1 . "WS"))))
    )
  )
  (princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or for no selection needed:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:foo (/ s)
  (if (setq s (ssget "_X" '((0 . "TEXT") (8 . "personnel"))))
    (foreach e (mapcar 'cadr (ssnamex s)) (entmod (append (entget e) '((1 . "WS")))))
  )
  (princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This can also be accomplished by using a little snippet like this and changing whatever property you'd like in the properties palette.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(sssetfirst nil (ssget "_X" '((0 . "TEXT")(8 . "personnel"))))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or use the FILTER command. Many ways to skin this cat.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 18:58:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-all-text-on-a-layer-to-same-word/m-p/9637531#M72116</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2020-07-15T18:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change all text on a layer  to same word</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-all-text-on-a-layer-to-same-word/m-p/9637600#M72117</link>
      <description>&lt;P&gt;Another approach, posted mostly because it also&amp;nbsp;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;includes Mtext&lt;/EM&gt;&lt;/FONT&gt;&amp;nbsp; if you need that:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;(defun C:TEST (/ ss n)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; (if (setq ss (ssget "_X" '((0 . "&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;*&lt;/STRONG&gt;TEXT&lt;/FONT&gt;") (8 . "&lt;EM&gt;&lt;FONT color="#00CCFF"&gt;YourLayerName&lt;/FONT&gt;&lt;/EM&gt;"))))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; &amp;nbsp; (repeat (setq n (sslength ss))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; (vla-put-TextString (vlax-ename-&amp;gt;vla-object (ssname ss (setq n (1- n)))) "WS")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; &amp;nbsp; )&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; )&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; (princ)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;)&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 19:20:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-all-text-on-a-layer-to-same-word/m-p/9637600#M72117</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2020-07-15T19:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change all text on a layer  to same word</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-all-text-on-a-layer-to-same-word/m-p/9637673#M72118</link>
      <description>&lt;P&gt;It worked! Thanks for saving me so much time!&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 19:59:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-all-text-on-a-layer-to-same-word/m-p/9637673#M72118</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-15T19:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change all text on a layer  to same word</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-all-text-on-a-layer-to-same-word/m-p/9637682#M72119</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;It worked! Thanks for saving me so much time!&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":clinking_beer_mugs:"&gt;🍻&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 20:03:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-all-text-on-a-layer-to-same-word/m-p/9637682#M72119</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2020-07-15T20:03:32Z</dc:date>
    </item>
  </channel>
</rss>

