<?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: Find and replace text in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/13197716#M141400</link>
    <description>&lt;P&gt;Hello!&amp;nbsp; I have tried this code and I get an error before it does anything, which is "; error: Automation Error. Currently write protected".&amp;nbsp; Does anyone know what this means?&amp;nbsp; I've used other code to do the same thing but the result is the same as this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your time!&lt;/P&gt;&lt;P&gt;Drafter_Joe&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Dec 2024 17:59:48 GMT</pubDate>
    <dc:creator>Designer-Drafter_Joe</dc:creator>
    <dc:date>2024-12-06T17:59:48Z</dc:date>
    <item>
      <title>Find and replace text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/5649883#M141388</link>
      <description>&lt;P&gt;I've searched around and found a couple lisps that would find text and replace them (without a dialog). One exmple is from this forum post here:&amp;nbsp;&lt;A href="http://forums.augi.com/showthread.php?43053-Take-existing-drawings-and-find-all-quot-quot-and-replace-with-quot-1-4-quot&amp;amp;p=521248&amp;amp;viewfull=1#post521248" target="_self"&gt;http://forums.augi.com/showthread.php?43053-Take-existing-drawings-and-find-all-quot-quot-and-replace-with-quot-1-4-quot&amp;amp;p=521248&amp;amp;viewfull=1#post521248&lt;/A&gt;&amp;nbsp;I have copied the code it&amp;nbsp;below. I wanted to see if anyone could modify it to also find text inside of tables also which it doesn't seem to do.&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;;-------------------------------------------------------------------------------
; FindReplaceAll - Changes Text, Mtext, Dimensions and Attribute Block entities
; that have a Find$ string with a Replace$ string.
; Arguments: 2
;   Find$ = Phrase string to find
;   Replace$ = Phrase to replace it with
; Syntax: (FindReplaceAll "old string" "new string")
; Returns: Updates Text, Mtext, Dimension and Attribute Block entities
;-------------------------------------------------------------------------------
(defun c:FindReplaceAll (Find$ Replace$ / BlkEntList@ BlkEntName^ BlkEntType$ Cnt#
  DimEntList@ DimEntName^ DimEntType$ EntList@ EntName^ EntType$ FindReplace:
  Mid$ Mid2$ NewText$ Num# Replace$ SS&amp;amp; Text$)
  ;-----------------------------------------------------------------------------
  ; FindReplace: - Returns Str$ with Find$ changed to Replace$
  ; Arguments: 3
  ;   Str$ = Text string
  ;   Find$ = Phrase string to find
  ;   Replace$ = Phrase to replace Find$ with
  ; Returns: Returns Str$ with Find$ changed to Replace$
  ;-----------------------------------------------------------------------------
  (defun FindReplace: (Str$ Find$ Replace$ / Cnt# FindLen# Loop Mid$ NewStr$ ReplaceLen#)
    (setq Loop t Cnt# 1 NewStr$ Str$ FindLen# (strlen Find$) ReplaceLen# (strlen Replace$))
    (while Loop
      (setq Mid$ (substr NewStr$ Cnt# FindLen#))
      (if (= Mid$ Find$)
        (setq NewStr$ (strcat (substr NewStr$ 1 (1- Cnt#)) Replace$ (substr NewStr$ (+ Cnt# FindLen#)))
              Cnt# (+ Cnt# ReplaceLen#)
        );setq
        (setq Cnt# (1+ Cnt#))
      );if
      (if (= Mid$ "") (setq Loop nil))
    );while
    NewStr$
  );defun FindReplace:
  ;-----------------------------------------------------------------------------
  ; Start of Main function
  ;-----------------------------------------------------------------------------
  (if (and (= (type Find$) 'STR)(= (type Replace$) 'STR)(/= Find$ ""))
    (progn
      (if (setq SS&amp;amp; (ssget "x" (list '(-4 . "&amp;lt;AND")'(-4 . "&amp;lt;OR")'(0 . "TEXT")'(0 . "MTEXT")'(0 . "DIMENSION")'(0 . "INSERT")'(-4 . "OR&amp;gt;")(cons 410 (getvar "CTAB"))'(-4 . "AND&amp;gt;"))))
        (progn
          (command "UNDO" "BEGIN")
          (setq Cnt# 0)
          (repeat (sslength SS&amp;amp;)
            (setq EntName^ (ssname SS&amp;amp; Cnt#)
                  EntList@ (entget EntName^)
                  EntType$ (cdr (assoc 0 EntList@))
                  Text$ (cdr (assoc 1 EntList@))
            );setq
            (if (= EntType$ "INSERT")
              (if (assoc 66 EntList@)
                (progn
                  (while (/= (cdr (assoc 0 EntList@)) "SEQEND")
                    (setq EntList@ (entget EntName^))
                    (if (= (cdr (assoc 0 EntList@)) "ATTRIB")
                      (progn
                        (setq Text$ (cdr (assoc 1 EntList@)))
                        (if (wcmatch Text$ (strcat "*" Find$ "*"))
                          (progn
                            (setq ReplaceWith$ (FindReplace: Text$ Find$ Replace$))
                            (entmod (subst (cons 1 ReplaceWith$) (assoc 1 EntList@) EntList@))
                            (entupd EntName^)
                          );progn
                        );if
                      );progn
                    );if
                    (setq EntName^ (entnext EntName^))
                  );while
                );progn
              );if
              (if (wcmatch Text$ (strcat "*" Find$ "*"))
                (progn
                  (setq ReplaceWith$ (FindReplace: Text$ Find$ Replace$))
                  (entmod (subst (cons 1 ReplaceWith$) (assoc 1 EntList@) EntList@))
                  (entupd EntName^)
                );progn
              );if
            );if
            (setq Cnt# (1+ Cnt#))
          );repeat
          (command "UNDO" "END")
        );progn
      );if
    );progn
  );if
  (princ)
);defun FindReplaceAll&lt;/PRE&gt;</description>
      <pubDate>Sat, 23 May 2015 16:48:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/5649883#M141388</guid>
      <dc:creator>zasanil</dc:creator>
      <dc:date>2015-05-23T16:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/5650489#M141389</link>
      <description>&lt;P&gt;Please upload your dwg, where to apply&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2015 01:59:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/5650489#M141389</guid>
      <dc:creator>devitg</dc:creator>
      <dc:date>2015-05-25T01:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/5650919#M141390</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;Attached is an example drawing. I basicaly want to be able to do what the "FIND" command in autcad does where it will replace a text string with another text string. It would look at every text string in the drawing and replace it. It could be in blocks, nested blocks, tables, text, mtext, attributes, etc. The code I found above works on some items but not all (Not like the "FIND" command).&lt;/P&gt;
&lt;P&gt;I'm really after a routine I can incorporate into my lisp program that would act as a function where I could have:&lt;/P&gt;
&lt;P&gt;(c:FindReplaceText "old string" "new string")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2015 15:03:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/5650919#M141390</guid>
      <dc:creator>zasanil</dc:creator>
      <dc:date>2015-05-25T15:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/5654471#M141391</link>
      <description>&lt;P&gt;Please state a true old string newstring at the dwg sample&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2015 00:55:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/5654471#M141391</guid>
      <dc:creator>devitg</dc:creator>
      <dc:date>2015-05-28T00:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/5654480#M141392</link>
      <description>&lt;P&gt;In the example I posted, the oldstring would equal "xxxxxx" and would be replaced by the newstring "900999"&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2015 01:35:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/5654480#M141392</guid>
      <dc:creator>zasanil</dc:creator>
      <dc:date>2015-05-28T01:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/5655059#M141393</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With this, it seem to do work in object ACAD_TABLE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun my_replace_text (new_string old_string / js n ename)
  (vl-load-com)
  (defun string-subst (nam_obj / value_string nbs tmp_nbs)
    (setq value_string (vlax-get nam_obj 'TextString) nbs 0)
    (while nbs
      (if (setq nbs (vl-string-search old_string value_string (setq tmp_nbs nbs)))
        (setq
          value_string (vl-string-subst new_string old_string value_string tmp_nbs)
          nbs (1+ nbs)
        )
      )
    )
    (vlax-put nam_obj 'TextString value_string)
  )
  (defun tabl_subst (obj / eRows eColumns R C val nbs tmp_nbs)
    (setq
      eRows (vla-get-rows obj)
      eColumns (vla-get-columns obj)
      R 0
    )
    (repeat eRows
      (setq C 0)
      (repeat eColumns
        (setq val (vla-GetText obj R C) nbs 0 tmp_nbs nil)
        (while nbs
          (if (setq nbs (vl-string-search old_string val (setq tmp_nbs nbs)))
            (setq
              val (vl-string-subst new_string old_string val tmp_nbs)
              nbs (1+ nbs)
            )
          )
        )
        (vla-SetText obj R C val)
        (setq C (+ C 1))
      )
      (setq R (+ R 1))
    )
  )
  (setq js
    (ssget "_X"
      '(
        (-4 . "&amp;lt;OR")
          (0 . "*TEXT,MULTILEADER,ATTDEF,ACAD_TABLE")
          (-4 . "&amp;lt;AND")
            (0 . "INSERT") (66 . 1)
          (-4 . "AND&amp;gt;")
        (-4 . "OR&amp;gt;")
      )
    )
  )
  (cond
    (js
      (repeat (setq n (sslength js))
        (setq ename (vlax-ename-&amp;gt;vla-object (ssname js (setq n (1- n)))))
        (cond
          ((vlax-property-available-p ename 'TextString)
            (string-subst ename)
          )
          ((vlax-property-available-p ename 'Rows)
            (tabl_subst ename)
          )
          (T
            (mapcar 
              '(lambda (att)
                (string-subst att)
              )
              (vlax-invoke ename 'GetAttributes)
            )
          )
        )
      )
    )
  )
  (prin1)
)&lt;/PRE&gt;
&lt;P&gt;Use (my_replace_text "900999" "xxxxxx")&lt;/P&gt;
&lt;P&gt;This syntax can be used in a script for multiples drawings...&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2015 13:30:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/5655059#M141393</guid>
      <dc:creator>CADaSchtroumpf</dc:creator>
      <dc:date>2015-05-28T13:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/5655107#M141394</link>
      <description>&lt;P&gt;Hi CADAStroumph,&lt;/P&gt;
&lt;P&gt;That does work great for tables and attributes. Would it be easy to adjust it so it will search and replace in blocks / nested blockes also? I think thats one of the only peices I'm missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2015 13:58:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/5655107#M141394</guid>
      <dc:creator>zasanil</dc:creator>
      <dc:date>2015-05-28T13:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/5656435#M141395</link>
      <description>&lt;P&gt;&lt;STRONG&gt;so it will search and replace in blocks / nested blockes also?&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;You can try, just work's with attribut in nested blocks, after is hard to me to continue in nested block for table or other.&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;(defun my_replace_text (new_string old_string / js n ename first_blk l_blk n_blk)
  (vl-load-com)
  (defun xplore (l / ent cnt msg)
    (setq ent (entget (cdr (assoc -2 l))) cnt 0)
    (cond
      ((eq (cdr (assoc 0 ent)) "INSERT")
        (mapcar 
          '(lambda (att)
            (string-subst att)
          )
          (vlax-invoke (vlax-ename-&amp;gt;vla-object (cdar ent)) 'GetAttributes)
        )
        (while (setq ent (entnext (cdar ent)))
          (setq ent (entget ent))
          (if (eq (cdr (assoc 0 ent)) "INSERT")
            (progn
              (setq cnt (1+ cnt))
              (repeat cnt
                (mapcar 
                  '(lambda (att)
                    (string-subst att)
                  )
                  (vlax-invoke (vlax-ename-&amp;gt;vla-object (cdar ent)) 'GetAttributes)
                )
              )
            )
          )
        )
      )
    )
  )
  (defun string-subst (nam_obj / value_string nbs tmp_nbs)
    (setq value_string (vlax-get nam_obj 'TextString) nbs 0)
    (while nbs
      (if (setq nbs (vl-string-search old_string value_string (setq tmp_nbs nbs)))
        (setq
          value_string (vl-string-subst new_string old_string value_string tmp_nbs)
          nbs (1+ nbs)
        )
      )
    )
    (vlax-put nam_obj 'TextString value_string)
  )
  (defun tabl_subst (obj / eRows eColumns R C val nbs tmp_nbs)
    (setq
      eRows (vla-get-rows obj)
      eColumns (vla-get-columns obj)
      R 0
    )
    (repeat eRows
      (setq C 0)
      (repeat eColumns
        (setq val (vla-GetText obj R C) nbs 0 tmp_nbs nil)
        (while nbs
          (if (setq nbs (vl-string-search old_string val (setq tmp_nbs nbs)))
            (setq
              val (vl-string-subst new_string old_string val tmp_nbs)
              nbs (1+ nbs)
            )
          )
        )
        (vla-SetText obj R C val)
        (setq C (+ C 1))
      )
      (setq R (+ R 1))
    )
  )
  (setq first_blk (tblnext "BLOCK" T))
  (cond
    (first_blk
      (setq l_blk (list first_blk))
      (while (setq n_blk (tblnext "BLOCK"))
        (setq l_blk (cons n_blk l_blk))
      )
      (foreach n l_blk
        (if (/= (logand (cdr (assoc 70 n)) 4) 4)
          (if (/= (logand (cdr (assoc 70 n)) 16) 16)
            (xplore n)
          )
        )
      )
    )
  )
  (setq js
    (ssget "_X"
      '(
        (-4 . "&amp;lt;OR")
          (0 . "*TEXT,MULTILEADER,ATTDEF,ACAD_TABLE")
          (-4 . "&amp;lt;AND")
            (0 . "INSERT") (66 . 1)
          (-4 . "AND&amp;gt;")
        (-4 . "OR&amp;gt;")
      )
    )
  )
  (cond
    (js
      (repeat (setq n (sslength js))
        (setq ename (vlax-ename-&amp;gt;vla-object (ssname js (setq n (1- n)))))
        (cond
          ((vlax-property-available-p ename 'TextString)
            (string-subst ename)
          )
          ((vlax-property-available-p ename 'Rows)
            (tabl_subst ename)
          )
          (T
            (mapcar 
              '(lambda (att)
                (string-subst att)
              )
              (vlax-invoke ename 'GetAttributes)
            )
          )
        )
      )
    )
  )
  (prin1)
)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 12:09:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/5656435#M141395</guid>
      <dc:creator>CADaSchtroumpf</dc:creator>
      <dc:date>2015-05-29T12:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/5656586#M141396</link>
      <description>Don't forget to execute REGENALL at the end of the procedure to see the changes...</description>
      <pubDate>Fri, 29 May 2015 13:40:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/5656586#M141396</guid>
      <dc:creator>CADaSchtroumpf</dc:creator>
      <dc:date>2015-05-29T13:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/5656819#M141397</link>
      <description>&lt;P&gt;Thank you for your help CADStroumph! I appriciate it.&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 15:51:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/5656819#M141397</guid>
      <dc:creator>zasanil</dc:creator>
      <dc:date>2015-05-29T15:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/12047401#M141398</link>
      <description>&lt;P&gt;For people who have not done coding in a long long time, where do I incorporate my input for the text I want to replace?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2023 17:05:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/12047401#M141398</guid>
      <dc:creator>David125</dc:creator>
      <dc:date>2023-06-20T17:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/12047485#M141399</link>
      <description>&lt;P&gt;The word after (defun at the top is the function name.&amp;nbsp; The things after the left parenthesis following that and before the slash are the arguments that need to be supplied.&amp;nbsp; So to use it, type in a left parenthesis followed by the function name followed by values for the arguments [which in this case must be text strings] followed by a right parenthesis.&amp;nbsp; Note the order of the arguments.&amp;nbsp; To replace "that" [the old string] with "this" [the new string]:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;(my_replace_text "this" "that")&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2023 17:49:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/12047485#M141399</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-06-20T17:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/13197716#M141400</link>
      <description>&lt;P&gt;Hello!&amp;nbsp; I have tried this code and I get an error before it does anything, which is "; error: Automation Error. Currently write protected".&amp;nbsp; Does anyone know what this means?&amp;nbsp; I've used other code to do the same thing but the result is the same as this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your time!&lt;/P&gt;&lt;P&gt;Drafter_Joe&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2024 17:59:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/13197716#M141400</guid>
      <dc:creator>Designer-Drafter_Joe</dc:creator>
      <dc:date>2024-12-06T17:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/13200081#M141401</link>
      <description>&lt;P&gt;The error is due to 'something' in the vl portion of the code. You don't say 'which' Code you are using,&lt;/P&gt;&lt;P&gt;so it's hard to determine. Perhaps it is finding the target text is within a Dynamic block or a Dim that&lt;/P&gt;&lt;P&gt;is not 'changeable' .. or is write-protected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ECCAD&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2024 19:15:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/13200081#M141401</guid>
      <dc:creator>ec-cad</dc:creator>
      <dc:date>2024-12-08T19:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/13201218#M141402</link>
      <description>&lt;P&gt;Hello ec-cad,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are correct, I did not identify which of the 3 codes I was referring to.&amp;nbsp; I tried all three of them and got the same response.&amp;nbsp; I suppose I need code that disregards whatever text is found that is write-protected.&amp;nbsp; Unfortunately, I don't know Visual LISP, and I don't have any reference materials to help.&amp;nbsp; Might you, or someone else, have some example code that I can learn from?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!!&lt;/P&gt;&lt;P&gt;Drafter_Joe&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2024 13:19:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/13201218#M141402</guid>
      <dc:creator>Designer-Drafter_Joe</dc:creator>
      <dc:date>2024-12-09T13:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/13201741#M141403</link>
      <description>&lt;P&gt;Drafter_Joe. What I do with the 'tough' ones, is set a variable to 0 atop the lisp file,&lt;/P&gt;&lt;P&gt;then down the program, insert (setq variable 1) or 2, 3. etc. to get an idea of the 'area' in code&lt;/P&gt;&lt;P&gt;that is failing. Error trapping can also be used, or vl-catch-all-apply (search for that here) , or use VLIDE and step through&lt;/P&gt;&lt;P&gt;the code. Try the first approach using the Test.lsp attached. At Command Prompt, type !FLAG to find&lt;/P&gt;&lt;P&gt;the next #, that should be the area of concern.&lt;/P&gt;&lt;P&gt;I don't know of a way to capture that 'write-protect' error and have it recover.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ECCAD&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2024 17:42:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/13201741#M141403</guid>
      <dc:creator>ec-cad</dc:creator>
      <dc:date>2024-12-09T17:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/13201777#M141404</link>
      <description>ECCAD, That makes very good sense, great tip! Thank you! I will give your suggestion a try very soon and let you know the results. Incidentally, I found another LISP routine that did work, called "srxText" from CAD Studio, it's mentioned above in this post. Thank you again!&lt;BR /&gt;</description>
      <pubDate>Mon, 09 Dec 2024 17:57:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/13201777#M141404</guid>
      <dc:creator>Designer-Drafter_Joe</dc:creator>
      <dc:date>2024-12-09T17:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/13201782#M141405</link>
      <description>&lt;P&gt;Good Luck.&lt;/P&gt;&lt;P&gt;Glad you found a solution.&lt;/P&gt;&lt;P&gt;Cheers.!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ECCAD&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2024 18:00:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/13201782#M141405</guid>
      <dc:creator>ec-cad</dc:creator>
      <dc:date>2024-12-09T18:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/13201800#M141406</link>
      <description>&lt;P&gt;Well, I didn't finish that like I thought I did, started to mention a "But," deleted it and sent my reply without noticing.&amp;nbsp; Anyway, it works well, but it's an executable, .vlx program, can't use as a subroutine to have it run multiple times in a row like with the other ones in this thread.&amp;nbsp; Again, I'll report back on any progress.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Drafter_Joe&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2024 18:10:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/13201800#M141406</guid>
      <dc:creator>Designer-Drafter_Joe</dc:creator>
      <dc:date>2024-12-09T18:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/13201934#M141407</link>
      <description>&lt;P&gt;Sure, you (can) run it multiple times. You load it, run it. That yields a 'last' command.&lt;/P&gt;&lt;P&gt;You just hit the Enter key after making the first run, then hit the Enter key to repeat&lt;/P&gt;&lt;P&gt;that last command.&lt;/P&gt;&lt;P&gt;ECCAD&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2024 19:34:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-text/m-p/13201934#M141407</guid>
      <dc:creator>ec-cad</dc:creator>
      <dc:date>2024-12-09T19:34:48Z</dc:date>
    </item>
  </channel>
</rss>

