<?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: Looking for a Lisp to replace a block with another version of the same block in several drawings (Batch) in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214501#M5024</link>
    <description>&lt;P&gt;I think this line:&lt;/P&gt;&lt;P&gt;(setq scrline (strcat "open" " " n2 " " "(load\"batcher\")" " " "batcher_insert" " " "qsave" " " "close"))&lt;/P&gt;&lt;P&gt;Should have (c:batcher_insert) .. maybe.&lt;/P&gt;&lt;P&gt;ECCAD&lt;/P&gt;</description>
    <pubDate>Mon, 16 Dec 2024 19:38:49 GMT</pubDate>
    <dc:creator>ec-cad</dc:creator>
    <dc:date>2024-12-16T19:38:49Z</dc:date>
    <item>
      <title>Looking for a Lisp to replace a block with another version of the same block in several drawings (Batch)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214305#M5018</link>
      <description>&lt;P&gt;Hi everyone, I have looked for something similar here but have not succeeded.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have several drawings in a folder that I need to open one by one, delete a block, purge the block, and finally paste the new block version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The new block version is in another dwg, which I copied with the base point 0,0. The pasting is in the same coordinate, 0,0. All the blocks (the new version) and the old to be replaced have the same name and are located in the layout at 0,0 (not in the model). I do need to run the purge command after deleting so the block is pated with the new changes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm wondering if any of you have an LISP file that can help me automate this process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The inputs could be the Block name, the route of the new block version, and the folder route with the other drawings where the block will be replaced. Another option could be that the lisp is executed over the drawings opened in the current session, and the new block is taken from the active drawing where the command is executed.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 17:47:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214305#M5018</guid>
      <dc:creator>jesusrperezd</dc:creator>
      <dc:date>2024-12-16T17:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Lisp to replace a block with another version of the same block in several drawings (Batch)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214444#M5019</link>
      <description>&lt;P&gt;Have you tried the Express Tools "-BLOCKREPLACE" command with a script?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 19:05:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214444#M5019</guid>
      <dc:creator>pkenewell6347</dc:creator>
      <dc:date>2024-12-16T19:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Lisp to replace a block with another version of the same block in several drawings (Batch)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214450#M5020</link>
      <description>&lt;P&gt;A couple of questions:&lt;/P&gt;&lt;P&gt;Does the original block have attributes, and if so, do you want to perserve those values ?&lt;/P&gt;&lt;P&gt;A lisp can be made to swap out the 'old' block with a 'new' block by selecting the 'old'&lt;/P&gt;&lt;P&gt;blockname (foreach Layout), and checking the insert point, and scale factor. Then,&lt;/P&gt;&lt;P&gt;if you have the replacement block wblocked somewhere, it can be inserted in the same location&lt;/P&gt;&lt;P&gt;and scale factor. The question is, if the old block has attributes or not.&lt;/P&gt;&lt;P&gt;Or, updating the 'same' blockname can be done with a simple (command "_-insert" Blockname= ... type block update.&lt;/P&gt;&lt;P&gt;Could you post a sample drawing before / after ?&lt;/P&gt;&lt;P&gt;ECCAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 19:09:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214450#M5020</guid>
      <dc:creator>ec-cad</dc:creator>
      <dc:date>2024-12-16T19:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Lisp to replace a block with another version of the same block in several drawings (Batch)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214451#M5021</link>
      <description>To do what you want easily without fighting AutoCAD's built-in nature, your "bad" DWG file needs to be inserted in your "good" DWG file, then you SAVEAS to put it back where it came from (maybe add an identifier so you still have that original).&lt;BR /&gt;&lt;BR /&gt;Is that an option?&lt;BR /&gt;&lt;BR /&gt;NOTE: LISP stops working when you start/open a different DWG file. So you need to use a script processor to open/close all of your DWG files and run your LISP inside each one. Do you have one you like to use?</description>
      <pubDate>Mon, 16 Dec 2024 19:10:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214451#M5021</guid>
      <dc:creator>pendean</dc:creator>
      <dc:date>2024-12-16T19:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Lisp to replace a block with another version of the same block in several drawings (Batch)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214484#M5022</link>
      <description>&lt;P&gt;I pieced this together with some code I had and some from Lee Mac.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Instructions:&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Most importantly, back up the directory first, as a fail-safe.&lt;/LI&gt;&lt;LI&gt;Change the block name where I've commented.&lt;/LI&gt;&lt;LI&gt;Load/run this from a new unsaved drawing, or one that doesn't reside in the directory to be processed.&lt;/LI&gt;&lt;LI&gt;Clean-up. There will be a scrfile.scr file located in the selected directory that will need to be deleted after running the function.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lightly tested.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 19:50:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214484#M5022</guid>
      <dc:creator>DGCSCAD</dc:creator>
      <dc:date>2024-12-16T19:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Lisp to replace a block with another version of the same block in several drawings (Batch)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214499#M5023</link>
      <description>Hi, pkenewell6347. No, I haven't tried it. So, wil the script run over all the drawings i select? Thanks for your time!&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Dec 2024 19:38:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214499#M5023</guid>
      <dc:creator>jesusrperezd</dc:creator>
      <dc:date>2024-12-16T19:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Lisp to replace a block with another version of the same block in several drawings (Batch)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214501#M5024</link>
      <description>&lt;P&gt;I think this line:&lt;/P&gt;&lt;P&gt;(setq scrline (strcat "open" " " n2 " " "(load\"batcher\")" " " "batcher_insert" " " "qsave" " " "close"))&lt;/P&gt;&lt;P&gt;Should have (c:batcher_insert) .. maybe.&lt;/P&gt;&lt;P&gt;ECCAD&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 19:38:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214501#M5024</guid>
      <dc:creator>ec-cad</dc:creator>
      <dc:date>2024-12-16T19:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Lisp to replace a block with another version of the same block in several drawings (Batch)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214508#M5025</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7921769"&gt;@jesusrperezd&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi, pkenewell6347. No, I haven't tried it. So, wil the script run over all the drawings i select? Thanks for your time!&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Nevermind on that. Both blocks need to be in the drawing and named differently with BLOCKREPLACE.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 19:41:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214508#M5025</guid>
      <dc:creator>pkenewell6347</dc:creator>
      <dc:date>2024-12-16T19:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Lisp to replace a block with another version of the same block in several drawings (Batch)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214509#M5026</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15306255"&gt;@ec-cad&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;I think this line:&lt;/P&gt;&lt;P&gt;(setq scrline (strcat "open" " " n2 " " "(load\"batcher\")" " " "batcher_insert" " " "qsave" " " "close"))&lt;/P&gt;&lt;P&gt;Should have (c:batcher_insert) .. maybe.&lt;/P&gt;&lt;P&gt;ECCAD&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It's not inside a function, so normal command call. The scrline variable is a string that is setting the script.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 19:41:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214509#M5026</guid>
      <dc:creator>DGCSCAD</dc:creator>
      <dc:date>2024-12-16T19:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Lisp to replace a block with another version of the same block in several drawings (Batch)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214510#M5027</link>
      <description>Hi ec-cad. The original block has attributes, as well as the new one, but I don't care about losing the values loaded on the attributes. I have a routine that I can run so all the attributes will be filled again quickly.&lt;BR /&gt;The insert point is the same for both (0,0). The scale factor is 1. The dwg files only have a layout&lt;BR /&gt;&lt;BR /&gt;Thanks for your time!</description>
      <pubDate>Mon, 16 Dec 2024 19:41:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214510#M5027</guid>
      <dc:creator>jesusrperezd</dc:creator>
      <dc:date>2024-12-16T19:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Lisp to replace a block with another version of the same block in several drawings (Batch)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214557#M5028</link>
      <description>&lt;P&gt;Thanks for doing this.&lt;BR /&gt;&lt;BR /&gt;I opened the file and saw the line:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;(setq blk_ss (ssget "_X" '((0 . "INSERT") (2 . "YourBlockName"))));;;&amp;lt;-----Replace YourBlockName with your actual block name. Use \\ if a path is needed, i.e.: C:\\YourPath\\YourBlockName&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My new block is named 'TMP'&amp;nbsp; (it is always the same name).&amp;nbsp; I understand that If the new block is in the active drawing, I just write "TMP"&amp;nbsp; (&lt;FONT color="#0000FF"&gt;"YourBlockName"&lt;/FONT&gt;), if the block is in another route&amp;nbsp; I write the route, let's say "&lt;FONT color="#0000FF"&gt;C:\\&lt;/FONT&gt;Users\JP\Desktop\tes lisp\xxf.dwg\TMP" .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did I understand this well?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another question, I saw 2 execution commands Batcher and Batcher_insert, I suppose I have to execute only the Batcher, is that correct?&amp;nbsp; I'm trying to find a step-by-step process.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks again!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 20:03:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214557#M5028</guid>
      <dc:creator>jesusrperezd</dc:creator>
      <dc:date>2024-12-16T20:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Lisp to replace a block with another version of the same block in several drawings (Batch)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214596#M5029</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7921769"&gt;@jesusrperezd&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Thanks for doing this.&lt;BR /&gt;&lt;BR /&gt;I opened the file and saw the line:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;(setq blk_ss (ssget "_X" '((0 . "INSERT") (2 . "YourBlockName"))));;;&amp;lt;-----Replace YourBlockName with your actual block name. Use \\ if a path is needed, i.e.: C:\\YourPath\\YourBlockName&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My new block is named 'TMP'&amp;nbsp; (it is always the same name).&amp;nbsp; I understand that If the new block is in the active drawing, I just write "TMP"&amp;nbsp; (&lt;FONT color="#0000FF"&gt;"YourBlockName"&lt;/FONT&gt;), if the block is in another route&amp;nbsp; I write the route, let's say "&lt;FONT color="#0000FF"&gt;C:\\&lt;/FONT&gt;Users\JP\Desktop\tes lisp\xxf.dwg\TMP" .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did I understand this well?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another question, I saw 2 execution commands Batcher and Batcher_insert, I suppose I have to execute only the Batcher, is that correct?&amp;nbsp; I'm trying to find a step-by-step process.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks again!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You are on the right track. Assuming you have your folder of drawings already backed-up:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step-by-Step Instructions:&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Download the new version of Batcher_Block.lsp (I've revised per your block name and new location).&lt;/LI&gt;&lt;LI&gt;Make sure to move the new Batcher_Block.lsp to a support/trusted path.&lt;/LI&gt;&lt;LI&gt;Drag/drop the new Batcher_Block.lsp onto a new unsaved drawing.&lt;/LI&gt;&lt;LI&gt;Type: Batcher&lt;/LI&gt;&lt;LI&gt;Locate the directory where the drawings to be changed reside when prompted.&lt;/LI&gt;&lt;LI&gt;Clean-up step from above (Message #5, Step #4).&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Mon, 16 Dec 2024 20:36:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214596#M5029</guid>
      <dc:creator>DGCSCAD</dc:creator>
      <dc:date>2024-12-16T20:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Lisp to replace a block with another version of the same block in several drawings (Batch)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214655#M5030</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7921769"&gt;@jesusrperezd&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;SPAN&gt;... if the block is in another route&amp;nbsp; I write the route, let's say "&lt;/SPAN&gt;&lt;FONT color="#000000"&gt;C:\\&lt;/FONT&gt;&lt;SPAN&gt;Users\JP\Desktop\tes lisp\&lt;FONT color="#FF0000"&gt;xxf.dwg&lt;/FONT&gt;\TMP" &lt;/SPAN&gt;&lt;SPAN&gt;!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Also, the quoted text in red above doesn't seem like a valid directory. You'll need to change that line to the real valid directory, but use double backslashes for each folder level, as in:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;C:\\Users\\JP\\tes lisp\\BLOCKNAMEHERE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...where BLOCKNAMEHERE is the block name TMP.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 20:44:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214655#M5030</guid>
      <dc:creator>DGCSCAD</dc:creator>
      <dc:date>2024-12-16T20:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Lisp to replace a block with another version of the same block in several drawings (Batch)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214670#M5031</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7921769"&gt;@jesusrperezd&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi ec-cad. &lt;FONT color="#FF0000"&gt;The original block has attributes&lt;/FONT&gt;, as well as the new one, but I don't care about losing the values loaded on the attributes. I have a routine that I can run so all the attributes will be filled again quickly.&lt;BR /&gt;The insert point is the same for both (0,0). The scale factor is 1. The dwg files only have a layout&lt;BR /&gt;&lt;BR /&gt;Thanks for your time!&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Just saw this pertinent information. That'll throw a monkey wrench into the gears. The insert command call will need to have the attributes taken into consideration.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 21:02:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214670#M5031</guid>
      <dc:creator>DGCSCAD</dc:creator>
      <dc:date>2024-12-16T21:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Lisp to replace a block with another version of the same block in several drawings (Batch)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214704#M5032</link>
      <description>&lt;P&gt;Im sorry I got an error. It happens after it opens the first drawing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;. Please check the message I got:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Enter name of drawing to open &amp;lt;C:\Users\JP\Desktop\tes lisp\241206\N2P13947.01.dwg&amp;gt;: "C:\Users\JP\Desktop\tes lisp\241206\N2P13947.01.dwg"&lt;BR /&gt;Opening an AutoCAD 2018 format file.&lt;BR /&gt;Regenerating layout.&lt;BR /&gt;Regenerating model.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;AutoCAD menu utilities loaded.&lt;BR /&gt;Command:&lt;/P&gt;&lt;P&gt;Autodesk DWG. This file is a TrustedDWG last saved by an Autodesk application or Autodesk licensed application.&lt;/P&gt;&lt;P&gt;Command:&lt;/P&gt;&lt;P&gt;Command:&lt;BR /&gt;Command: (load"batcher") ; error: LOAD failed: "batcher"&lt;/P&gt;&lt;P&gt;Command: batcher_insert Unknown command "BATCHER_INSERT". Press F1 for help.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 21:10:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214704#M5032</guid>
      <dc:creator>jesusrperezd</dc:creator>
      <dc:date>2024-12-16T21:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Lisp to replace a block with another version of the same block in several drawings (Batch)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214763#M5033</link>
      <description>&lt;P&gt;Yes, it's in a script. BUT, the script must load "batcher_block", not "batcher", and&lt;/P&gt;&lt;P&gt;to call the Command function inside batcher_block, you will have to do "(C:&lt;SPAN&gt;batcher_insert)",&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So the whole line =:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(setq scrline (strcat "open" " " n2 " " "(load\"batcher_block\")" " " "(C:batcher_insert)" " " "qsave" " " "close"))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To avoid the Attributes, just before the (command "_-insert" ...... line - add (setvar 'attreq 0), as in:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(foreach n ins_list&lt;BR /&gt;(setvar 'attreq 0)&lt;BR /&gt;(command "-insert" "YourBlockName" n "" "" "")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The lisp file should be placed in a support path for input.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And, the block insert may need a formal 'path/path/blockname as well.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ECCAD&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 21:36:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214763#M5033</guid>
      <dc:creator>ec-cad</dc:creator>
      <dc:date>2024-12-16T21:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Lisp to replace a block with another version of the same block in several drawings (Batch)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214868#M5034</link>
      <description>&lt;P&gt;Yes, ec-cad has the correct command call for &lt;SPAN&gt;(load\"batcher_block\")&lt;/SPAN&gt;. My apologies, it was an oversight on my part.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The command call for (c:bacher_insert) can be called either way. It will be called at the command line on each drawing, so it can be called using it's localized command call name, or in parenthesis.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the ATTREQ, I'd set that before the foreach, then reset it back to what it was after the insert(s).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...and yes, Batcher_Block.lsp needs to be located on a support/trusted path. Lots of little things need to be in place, but when they are it'll get you the results you're after. I've been using variations of this batch routine for a long time, so I tend to glaze over the important stuff that I have already set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can get to this tomorrow with an updated lisp file if noone else posts up a solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15306255"&gt;@ec-cad&lt;/a&gt;Thank you for the revisions! Was speed posting.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 22:52:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214868#M5034</guid>
      <dc:creator>DGCSCAD</dc:creator>
      <dc:date>2024-12-16T22:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Lisp to replace a block with another version of the same block in several drawings (Batch)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214878#M5035</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7921769"&gt;@jesusrperezd&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, if you could post the actual file location/folder of the TMP block, we can hard code that and make sure it's correct.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 22:50:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214878#M5035</guid>
      <dc:creator>DGCSCAD</dc:creator>
      <dc:date>2024-12-16T22:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Lisp to replace a block with another version of the same block in several drawings (Batch)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214910#M5036</link>
      <description>&lt;P&gt;If you already have the new block saved out into a folder location then would it not be as simple as using the built-in command of Insert blockname=pathofdwg.&lt;/P&gt;&lt;P&gt;For example if the &lt;STRONG&gt;block&lt;/STRONG&gt; inside the current dwg is named "&lt;STRONG&gt;My Block&lt;/STRONG&gt;" and the newer version is saved under &lt;STRONG&gt;C:\Autodesk\My Block.dwg&lt;/STRONG&gt;, then the following lisp code should replace the old with the new whether in &lt;STRONG&gt;Model&lt;/STRONG&gt; or &lt;STRONG&gt;Layout&lt;/STRONG&gt;:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(command "_.INSERT" "My Block=C:\\Autodesk\\My Block" \E)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 23:31:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13214910#M5036</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-12-16T23:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Lisp to replace a block with another version of the same block in several drawings (Batch)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13215822#M5037</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1137264"&gt;@paullimapa&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;If you already have the new block saved out into a folder location then would it not be as simple as using the built-in command of Insert blockname=pathofdwg.&lt;/P&gt;&lt;P&gt;For example if the &lt;STRONG&gt;block&lt;/STRONG&gt; inside the current dwg is named "&lt;STRONG&gt;My Block&lt;/STRONG&gt;" and the newer version is saved under &lt;STRONG&gt;C:\Autodesk\My Block.dwg&lt;/STRONG&gt;, then the following lisp code should replace the old with the new whether in &lt;STRONG&gt;Model&lt;/STRONG&gt; or &lt;STRONG&gt;Layout&lt;/STRONG&gt;:&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(command "_.INSERT" "My Block=C:\\Autodesk\\My Block" \E)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;I had no idea. Thats amazing. What is the \E switch for?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2024 12:12:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/looking-for-a-lisp-to-replace-a-block-with-another-version-of/m-p/13215822#M5037</guid>
      <dc:creator>DGCSCAD</dc:creator>
      <dc:date>2024-12-17T12:12:07Z</dc:date>
    </item>
  </channel>
</rss>

