<?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 replace block with another block in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8293105#M103096</link>
    <description>&lt;P&gt;&lt;FONT face="georgia,palatino" size="4"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="georgia,palatino" size="4"&gt;Try this complete program.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;A title="Replace Blocks with Another" href="https://autolispprograms.wordpress.com/replace-blocks-with-another/" target="_blank"&gt;https://autolispprograms.wordpress.com/replace-blocks-with-another/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Sep 2018 07:17:32 GMT</pubDate>
    <dc:creator>_Tharwat</dc:creator>
    <dc:date>2018-09-26T07:17:32Z</dc:date>
    <item>
      <title>Lisp to replace block with another block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8094625#M103084</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried the below lisp to replace the block "RR" with "Level".&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;(defun C:QW4 ()&lt;/P&gt;&lt;P&gt;((C:-BLOCKREPLACE) "RR" "level" ""))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{{ Command: QW4&lt;BR /&gt;Initializing...&lt;BR /&gt;Select the block to be replaced or [?/= (select object)]: }}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After enter QW4 command, its prompting to select the block instead of replacing. Please resolve this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bala&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 11:47:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8094625#M103084</guid>
      <dc:creator>Manicbala</dc:creator>
      <dc:date>2018-06-27T11:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to replace block with another block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8094708#M103085</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2684967"&gt;@Manicbala&lt;/a&gt;&amp;nbsp;as&amp;nbsp;&lt;FONT color="#808080"&gt;_.Blockreplace&lt;/FONT&gt;&amp;nbsp;comes from the VBA code, you will not have the result waiting using this code.&lt;BR /&gt;But you can try something less structured like the code below and it will have a similar result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:QW4 (/ ss nbl)
  (prompt "\nSelect block: ")
  (if (setq ss (ssget "_:S:E" '((0 . "INSERT"))))
    (progn
      (setq ss (entget (setq ss (ssname ss 0))))
      (redraw (cdr (assoc 330 ss)) 3)
      (prompt
	"\nSelect blocks to be replaced: "
      )
      (while (setq nbl (ssget "_:S:E" '((0 . "INSERT"))))
	(setq nbl (entget (setq nbl (ssname nbl 0))))
	(entmod	(subst (assoc 2 nbl)
		       (assoc 2 ss)
		       ss
		)
	)
	(redraw entBlock 4)
      )
    )
  )
  (princ)
)
(prompt "Type &amp;gt;&amp;gt; Qw4 &amp;lt;&amp;lt;")&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 12:17:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8094708#M103085</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-27T12:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to replace block with another block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8094723#M103086</link>
      <description>&lt;P&gt;Go to Express tools to access the Replace Block command. This command replace &lt;EM&gt;all instances&lt;/EM&gt; of an existing block with another. You may need to SYNC the block after performing the command.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Express Tools&amp;gt;Blocks Panel&amp;gt;Replace Block" style="width: 331px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/516661iFF290DCF1A12B135/image-size/large?v=v2&amp;amp;px=999" role="button" title="repl blk.PNG" alt="Express Tools&amp;gt;Blocks Panel&amp;gt;Replace Block" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Express Tools&amp;gt;Blocks Panel&amp;gt;Replace Block&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 12:21:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8094723#M103086</guid>
      <dc:creator>ChicagoLooper</dc:creator>
      <dc:date>2018-06-27T12:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to replace block with another block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8094766#M103087</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;Thanks for your response.. Its working fine. But instead of selecting the blocks manually. I want to change the block "RR" to block "Level".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bala&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 12:34:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8094766#M103087</guid>
      <dc:creator>Manicbala</dc:creator>
      <dc:date>2018-06-27T12:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to replace block with another block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8094912#M103088</link>
      <description>&lt;P&gt;This one lets you select which ones to replace with another one in the drawing like a swap. I never tried to use it for what I think you are asking but I think it would do it. I use it to replace blocks with similar blocks but are different colors to note they are to be demoed. Its great when you don't want to swap them all out which I find is most of the time.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 13:13:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8094912#M103088</guid>
      <dc:creator>gotphish001</dc:creator>
      <dc:date>2018-06-27T13:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to replace block with another block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8094928#M103089</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2684967"&gt;@Manicbala&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp;instead of selecting the blocks manually. I want to change the block "RR" to block "Level".&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;(defun C:RR-Level (/ ss n edata)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (if (setq ss (ssget "_X" '((2 . "RR"))))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (repeat (setq n (sslength ss))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (setq edata (entget (ssname ss (setq n (1- n)))))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (entmod (subst '(2 . "Level") '(2 . "RR") edata))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ); repeat&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ); if&lt;/P&gt;
&lt;P&gt;); defun&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 13:19:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8094928#M103089</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-06-27T13:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to replace block with another block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8094944#M103090</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2684967"&gt;@Manicbala&lt;/a&gt;&amp;nbsp;Like that ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:Qw4 (/ Jr_replaceall answr ent idx nbl obj ss)
  (vl-load-com)
  (if (not Jr_replaceall)
    (setq Jr_replaceall "Single")
    )
  (Command "-.Undo" "_Be")
  (if (and (setq ss (ssget ":S" '((0 . "INSERT"))))
	   (progn
	     (initget "S A")
	     (if (setq answr (getkword "\nReplace only this block or replace All [Single / All]:"))
	       (setq Jr_replaceall answr)
	       (setq answr Jr_replaceall)
	       )
	     )
	   (setq nbl (getstring "\nBlock name to replace with: "))
	   (tblobjname "BLOCK" nbl)
	   )
    (progn
      (if (eq Jr_replaceall "A")
	(setq ss (ssget "x" (list '(0 . "INSERT") (assoc 2 (entget (ssname ss 0))))))
	)
      (setq idx -1)
      (while (setq ent (ssname ss (setq idx (1+ idx))))
	(setq obj (vlax-ename-&amp;gt;vla-object ent))
	(vla-put-name obj nbl)
	(vla-update obj)
	)
      )
    )
  (command "_.Undo" "_End")
  (princ (strcat "\nReplaced " (itoa idx) " Blocks"))
  (princ)
  )&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 13:28:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8094944#M103090</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-27T13:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to replace block with another block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8094948#M103091</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2684967"&gt;@Manicbala&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried the below lisp to replace the block "RR" with "Level".&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;(defun C:QW4 ()&lt;/P&gt;&lt;P&gt;((C:-BLOCKREPLACE) "RR" "level" ""))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{{ Command: QW4&lt;BR /&gt;Initializing...&lt;BR /&gt;Select the block to be replaced or [?/= (select object)]: }}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After enter QW4 command, its prompting to select the block instead of replacing. Please resolve this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bala&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You have&amp;nbsp;two extra parenthesis in places where there should be non.&lt;/P&gt;&lt;PRE&gt;(defun C:QW4 ()

(&lt;FONT size="4"&gt;&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;C:-BLOCKREPLACE&lt;STRONG&gt;&lt;FONT color="#ff0000" size="4"&gt;)&lt;/FONT&gt;&lt;/STRONG&gt; "RR" "level" ""))&lt;/PRE&gt;&lt;P&gt;Change it to:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun C:QW4 ()
   (C:-BLOCKREPLACE "RR" "level" "")
)&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Jun 2018 13:28:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8094948#M103091</guid>
      <dc:creator>roland.r71</dc:creator>
      <dc:date>2018-06-27T13:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to replace block with another block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8095006#M103092</link>
      <description>&lt;P&gt;Not working.. Getting below error.&lt;/P&gt;&lt;P&gt;Command: QW4 ; error: too many arguments&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bala&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 13:41:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8095006#M103092</guid>
      <dc:creator>Manicbala</dc:creator>
      <dc:date>2018-06-27T13:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to replace block with another block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8095013#M103093</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;. The lisp working fine.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 13:44:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8095013#M103093</guid>
      <dc:creator>Manicbala</dc:creator>
      <dc:date>2018-06-27T13:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to replace block with another block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8095109#M103094</link>
      <description>&lt;P&gt;Yeah, my bad. Its Expresstools.&lt;/P&gt;&lt;P&gt;Which is notoriously lisp-unfriendly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The function in question takes no arguments and always asks for the block &amp;amp; replacement on the commandline. (you can find it inside [your acad programfiles dir.]\Express\blocktoxref.lsp )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only difference between the regular and - version is that the later will supress cmddia.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, you better stick to &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;'s solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 14:12:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8095109#M103094</guid>
      <dc:creator>roland.r71</dc:creator>
      <dc:date>2018-06-27T14:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to replace block with another block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8292909#M103095</link>
      <description>&lt;P&gt;Thank you very much. It's working for me...&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 05:57:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8292909#M103095</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-26T05:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to replace block with another block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8293105#M103096</link>
      <description>&lt;P&gt;&lt;FONT face="georgia,palatino" size="4"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="georgia,palatino" size="4"&gt;Try this complete program.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;A title="Replace Blocks with Another" href="https://autolispprograms.wordpress.com/replace-blocks-with-another/" target="_blank"&gt;https://autolispprograms.wordpress.com/replace-blocks-with-another/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 07:17:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8293105#M103096</guid>
      <dc:creator>_Tharwat</dc:creator>
      <dc:date>2018-09-26T07:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to replace block with another block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8293231#M103097</link>
      <description>&lt;P&gt;Thank you very much.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 08:15:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8293231#M103097</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-26T08:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to replace block with another block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8293544#M103098</link>
      <description>&lt;P&gt;You're most welcome.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 10:44:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/8293544#M103098</guid>
      <dc:creator>_Tharwat</dc:creator>
      <dc:date>2018-09-26T10:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to replace block with another block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/9402021#M103099</link>
      <description>&lt;P&gt;Is there a way to modify this lisp so I can make it always change a single block to a specific block? For example if I select a New Receptacle block (N-Recept) have it change to and existing Receptacle block (E-Recept). And I want it to change only the block that gets selected.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2020 15:03:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/9402021#M103099</guid>
      <dc:creator>blasseigne_HPA</dc:creator>
      <dc:date>2020-03-26T15:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to replace block with another block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/9402379#M103100</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8212882"&gt;@blasseigne_HPA&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Is there a way to modify this lisp so I can make it always change a single block to a specific block? For example if I select a New Receptacle block (N-Recept) have it change to and existing Receptacle block (E-Recept). And I want it to change only the block that gets selected.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;For that, I use the &lt;FONT color="#000000"&gt;&lt;STRONG&gt;BRS&lt;/STRONG&gt;&lt;/FONT&gt; command from &lt;STRONG&gt;&lt;FONT color="#000000"&gt;BlockReplace.lsp&lt;/FONT&gt;&lt;/STRONG&gt;, available &lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-and-replace-group-of-blocks-that-are-selected/m-p/4333482/highlight/true#M313227" target="_blank" rel="noopener"&gt;&amp;gt;here&amp;lt;&lt;/A&gt;.&amp;nbsp; The command name stands for &lt;STRONG&gt;&lt;FONT color="#000000"&gt;B&lt;/FONT&gt;&lt;/STRONG&gt;lock &lt;FONT color="#000000"&gt;&lt;STRONG&gt;R&lt;/STRONG&gt;&lt;/FONT&gt;eplace: &lt;FONT color="#000000"&gt;&lt;STRONG&gt;S&lt;/STRONG&gt;&lt;/FONT&gt;elected -- you give it your replacement Block name [E-Recept in your description], and then every Block you &lt;FONT color="#000000"&gt;&lt;STRONG&gt;S&lt;/STRONG&gt;&lt;/FONT&gt;elect [whether it's a N-Recept Block or not] will be turned into one of those, keeping its insertion point, scales, rotation, etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[There's also a &lt;STRONG&gt;&lt;FONT color="#000000"&gt;BRA&lt;/FONT&gt;&lt;/STRONG&gt; command, for &lt;STRONG&gt;&lt;FONT color="#000000"&gt;B&lt;/FONT&gt;&lt;/STRONG&gt;lock &lt;FONT color="#000000"&gt;&lt;STRONG&gt;R&lt;/STRONG&gt;&lt;/FONT&gt;eplace: &lt;FONT color="#000000"&gt;&lt;STRONG&gt;A&lt;/STRONG&gt;&lt;/FONT&gt;ll, in which you give it your replacement Block name, and then select &lt;EM&gt;one&lt;/EM&gt;&amp;nbsp; insertion of another Block, and &lt;FONT color="#000000"&gt;&lt;STRONG&gt;A&lt;/STRONG&gt;&lt;/FONT&gt;ll insertions of that Block name will be changed.]&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2020 17:10:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/9402379#M103100</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2020-03-26T17:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to replace block with another block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/9781700#M103101</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Correct me if I'm wrong. This is a LISP that does exactly what -BLOCKREPLACE should do if the command actually worked in LISP? I can't seem to get it to work. The block I am trying to replace is actually inside of another block (the title block to be exact). I am able to successfully replace the block when using BLOCKREPLACE in its normal capacity. But now that I am trying to automate the process using LISP, I've stumbled across this thread for obvious reasons.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I replaced the names of&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2684967"&gt;@Manicbala&lt;/a&gt;'s blocks in your LISP with the names of mine. The LISP ran successfully with no errors but the desired block was not replaced.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thoughts?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2020 20:29:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/9781700#M103101</guid>
      <dc:creator>BL_Apex</dc:creator>
      <dc:date>2020-10-02T20:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to replace block with another block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/9781730#M103102</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8670497"&gt;@BL_Apex&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;.... The block I am trying to replace is actually inside of another block ....&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I replaced the names of&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2684967"&gt;@Manicbala&lt;/a&gt;'s blocks in your LISP with the names of mine. The LISP ran successfully with no errors but the desired block was not replaced.&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Unfortunately, (ssget) can only "see" top-level objects, not nested ones.&amp;nbsp; You should be able to put the new Block definition into a drawing file of its own [not as a Block within the file, but as the top-level file contents] in a location AutoCAD can find [maybe you already have it that way], then use:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;-INSERT&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;YourNestedBlockName=YourNewFileName&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[note the &lt;EM&gt;hyphen prefix&lt;/EM&gt; on &lt;FONT color="#000000"&gt;&lt;STRONG&gt;-INSERT&lt;/STRONG&gt;&lt;/FONT&gt;], answer Yes to the question of whether to redefine it, and cancel without going through with Inserting another one.&amp;nbsp; That should update the definition of even a nested one.&amp;nbsp; You might need to &lt;FONT color="#000000"&gt;REGEN&lt;/FONT&gt; to see the change.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2020 21:06:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/9781730#M103102</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2020-10-02T21:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to replace block with another block</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/9781806#M103103</link>
      <description>&lt;P&gt;I believe this may be the ticket. I'll test it out and let you know.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2020 22:50:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-replace-block-with-another-block/m-p/9781806#M103103</guid>
      <dc:creator>BL_Apex</dc:creator>
      <dc:date>2020-10-02T22:50:27Z</dc:date>
    </item>
  </channel>
</rss>

