<?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 回复： Seek a lisp to change the title block for each layout in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13723612#M165205</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp;Sorry, I can not run..&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="skchui6159_0-1752475646046.png" style="width: 557px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1552094iC144D32C2BE42456/image-dimensions/557x66?v=v2" width="557" height="66" role="button" title="skchui6159_0-1752475646046.png" alt="skchui6159_0-1752475646046.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="skchui6159_1-1752475685873.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1552095i7023F9AFEA38645C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="skchui6159_1-1752475685873.png" alt="skchui6159_1-1752475685873.png" /&gt;&lt;/span&gt;, what is the problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Jul 2025 06:48:46 GMT</pubDate>
    <dc:creator>skchui6159</dc:creator>
    <dc:date>2025-07-14T06:48:46Z</dc:date>
    <item>
      <title>Seek a lisp to change the title block for each layout</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13722285#M165182</link>
      <description>&lt;P&gt;Referring to the previous post "&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/can-i-insert-attribute-in-all-current-opened-drawing-s-layout/m-p/12915829ost" target="_blank"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/can-i-insert-attribute-in-all-current-opened-drawing-s-layout/m-p/12915829ost&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are the new question that I can not solve. Can I replace the &lt;SPAN&gt;attribute value&lt;/SPAN&gt; from the &lt;SPAN&gt;existing&lt;/SPAN&gt;&amp;nbsp;title block to the blank title block for each layout referring other dwg? Then insert the new block using the old title block boundary to the same place of each layout. Then erase the old title block in the layout. There are two title block size need to import, there are A1 and A4. The drawing size is indicated on each drawing. Thank you very much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Jul 2025 13:18:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13722285#M165182</guid>
      <dc:creator>skchui6159</dc:creator>
      <dc:date>2025-07-12T13:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Seek a lisp to change the title block for each layout</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13722358#M165184</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14541765"&gt;@skchui6159&lt;/a&gt;&amp;nbsp;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check ATTR2ATTR command. it will work only if tag name is unique in block&amp;nbsp;as i can see, you duplicate tags without giving them unique name.&lt;/P&gt;&lt;P&gt;the source block (the block to take attribute values) must be laid beside the target.&lt;/P&gt;&lt;P&gt;after you picked source + target, the program catches all target references in drawing and that include in the Model space and all layouts (careful here&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;enjoy&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun c:attr2attr (/ _getAttrData ; local function
		      pick0 ename0 elist0 pick1 ename1 elist1 AcDbBlkRef0 AcDbBlkRef1 blkName1 ss1 attributes0 attributes1)

 (defun _getAttrData (AcDbBlkRef)
  (mapcar
    (function
      (lambda (AcDbAttrib)
       (cons (strcase (vla-get-tagString AcDbAttrib)) (vla-get-textString AcDbAttrib))
      )
    ); function
   (vlax-invoke AcDbBlkRef 'GetAttributes)
  ); mapcar
 ); _sorAttrData

  
 ; here start c:attr2attr
 (cond
  ((not
     (and
       (setq pick0 (entsel "\nPick source block: "))
       (setq ename0 (car pick0))
       (setq elist0 (entget ename0))
       (= (cdr (assoc '0 elist0)) "INSERT")
       (= (cdr (assoc '66 elist0)) 1)
     )
   )
   (prompt "\ninvalid object from source block.")
  ); case
  ((not
     (and
       (setq pick1 (entsel "\nPick target block: "))
       (setq ename1 (car pick1))
       (setq elist1 (entget ename1))
       (= (cdr (assoc '0 elist1)) "INSERT")
       (= (cdr (assoc '66 elist1)) 1)
     )
   )
   (prompt "\ninvalid object from target block.")
  ); case
  ( t   
   (setq AcDbBlkRef0 (vlax-ename-&amp;gt;vla-object ename0))
   (setq attributes0 (_getAttrData AcDbBlkRef0)) ; get source attributes
   
   (setq AcDbBlkRef1 (vlax-ename-&amp;gt;vla-object ename1))
   (setq blkName1 (vla-get-effectiveName AcDbBlkRef1))
   (vlax-release-object AcDbBlkRef1)

   (if (setq ss1 (ssget "_x" (list '(0 . "insert") (cons '2 (strcat blkName1 ",`*U*")))))
    (foreach ename1 (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss1)))
     (setq AcDbBlkRef1 (vlax-ename-&amp;gt;vla-object ename1))

     (mapcar
      (function
       (lambda (AcDbAttrib1 / tag1 dat)
        (setq tag1 (strcase (vla-get-tagString AcDbAttrib1)))

 	(if (setq dat (assoc tag1 attributes0))
         (vla-put-textString AcDbAttrib1 (cdr dat))
        )
       ); lambda
      ); function
      (setq attributes1 (vlax-invoke AcDbBlkRef1 'GetAttributes))
     ); vl-every
       
     (foreach o attributes1
      (vlax-release-object o)
     )
      
     (vlax-release-object AcDbBlkRef1)       
    ); foreach
     
   ); if
   
   (vlax-release-object AcDbBlkRef0)
  ); case
 ); cond

 (princ)
); c:attr2attr&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Jul 2025 15:40:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13722358#M165184</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2025-07-12T15:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Seek a lisp to change the title block for each layout</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13722406#M165185</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14541765"&gt;@skchui6159&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fix a bug&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Jul 2025 18:28:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13722406#M165185</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2025-07-12T18:28:47Z</dc:date>
    </item>
    <item>
      <title>回复： Seek a lisp to change the title block for each layout</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13722596#M165187</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your helping&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;. The unquie name &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;!&lt;/P&gt;&lt;P&gt;But there is a problem, there are the batch of dwgs about 4000dwgs need to work out, i need to use WScript (from Lee mac) and without selection any blocks to run lisp.&lt;/P&gt;&lt;P&gt;1. Could lisp use "Steal from Drawing" (from lee mac) to get the source dwg's blocks in specific file location in lisp?&lt;/P&gt;&lt;P&gt;2. Could lisp use "boundary box method" to find area which match the size of drawing in layout?&lt;/P&gt;&lt;P&gt;Thank for your help!&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jul 2025 00:07:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13722596#M165187</guid>
      <dc:creator>skchui6159</dc:creator>
      <dc:date>2025-07-13T00:07:45Z</dc:date>
    </item>
    <item>
      <title>回复： Seek a lisp to change the title block for each layout</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13722795#M165190</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14541765"&gt;@skchui6159&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14541765"&gt;@skchui6159&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your helping&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;. The unquie name &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;!&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;But there is a problem, there are the batch of dwgs about 4000dwgs&lt;/FONT&gt; need to work out, &lt;FONT color="#0000FF"&gt;i need to use WScript (from Lee mac) and without selection any blocks to run lisp.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;1. &lt;FONT color="#0000FF"&gt;Could lisp use "Steal from Drawing" (from lee mac) to get the source dwg's blocks in specific file location in lisp?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;2. Could lisp use "boundary box method" to find area which match the size of drawing in layout?&lt;/P&gt;&lt;P&gt;Thank for your help!&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;FONT color="#008080"&gt;Ha! 4000 dwg's? i do not want to&amp;nbsp;&lt;SPAN&gt;depress you so much but you have more problems then you are thinking of right now&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":rolling_on_the_floor_laughing:"&gt;🤣&lt;/span&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080"&gt;AutoLISP can select blocks by their name but can you &lt;SPAN&gt;guarantee the title blocks name? (especially the old)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080"&gt;&lt;SPAN&gt;if picking by boundary, can you guarantee the existence of the old block in place maybe it is exploded?!&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080"&gt;&lt;SPAN&gt;can you&amp;nbsp;guarantee the existence of all the attributes?&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080"&gt;add to that, files may fail to open cause it has errors that need to be Audit\Recover or some other problem with dependent files (xrefs, fonts...)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080"&gt;cheers,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080"&gt;Moshe&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jul 2025 06:32:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13722795#M165190</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2025-07-13T06:32:31Z</dc:date>
    </item>
    <item>
      <title>回复： Seek a lisp to change the title block for each layout</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13722821#M165191</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes. &lt;SPAN&gt;I&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;guarantee the title blocks name by below&lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I think use ssget "_x" and "ctab".&lt;/P&gt;&lt;P&gt;(setq blknam '("TITLE BLOCK" "TITLE BLOCK1" "1a32" "TITLE BLOCK 3" "TITLE BLOCK 4" "a1titleblock" "-TITLE_A1_DETAIL")) ; Define multiple block names in A1 block&lt;BR /&gt;(setq blknam_A4 '("TITLE BLOCK-A4")) ; Define multiple block names in A4 block&lt;BR /&gt;(setq blkstr (apply 'strcat (mapcar '(lambda (x) (strcat x ",")) blknam)))&lt;BR /&gt;(setq blkstr (vl-string-right-trim "," blkstr))&lt;BR /&gt;(setq blkstr (strcat blkstr ",`*U*"))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(if (setq ss1 (ssget "_X" (list '(0 . "INSERT")&lt;BR /&gt;(cons 2 blkstr)&lt;BR /&gt;'(66 . 1)&lt;BR /&gt;(cons 410 (getvar "CTAB"))))); to select the old block&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the specific name is a poosible method to select the block by specific name. If there are exploded block, just ignore it. (I think the old block can get the boundary pt for importing the new title block)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sure, all the attributes are existence.&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&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;P&gt;&lt;SPAN&gt;&amp;nbsp;files may fail to open cause it has errors that need to be Audit\Recover or some other problem with dependent files (xrefs, fonts...), oh no, can be solve?&lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jul 2025 07:57:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13722821#M165191</guid>
      <dc:creator>skchui6159</dc:creator>
      <dc:date>2025-07-13T07:57:28Z</dc:date>
    </item>
    <item>
      <title>回复： Seek a lisp to change the title block for each layout</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13722845#M165192</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14541765"&gt;@skchui6159&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WOW that's very good,&amp;nbsp;i see you can write code by your own so continue the good work and I (and so other experts invited) to help.&lt;/P&gt;&lt;P&gt;you need to &lt;SPAN&gt;incorporate&lt;/SPAN&gt; my code into yours to make it all work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so for the new block you can put it on standalone block file (as wblock) and insert it at 0,0,0 in model space - yes?&lt;/P&gt;&lt;P&gt;build a dotted pair list with all it attrib tag name + attrib value - delete the new title block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fetch the existing blocks with this code:&lt;/P&gt;&lt;P&gt;(setq ss1 (ssget "_X" (list '(0 . "insert")&amp;nbsp; (cons '2&amp;nbsp;&lt;SPAN&gt;blkstr)))) ; where blkstr is your combined string for all existing title blocks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;you can ignore CTAB if you want to replace every one in drawing (all layouts)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;at each iteration through selection set (for dynamic block make sure it name)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;insert the new title block on top of the existing,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;update all attributes value and delete the existing title block + qsave&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Vwalla &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt; - job done!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the rest i done from mr Lee Mac 'WScript' (or ScriptPro 2.0 from AutoDESK)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jul 2025 08:44:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13722845#M165192</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2025-07-13T08:44:13Z</dc:date>
    </item>
    <item>
      <title>回复： Seek a lisp to change the title block for each layout</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13722912#M165193</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think to get the minpt and maxpt, it can be done as follow code:&lt;/P&gt;&lt;P&gt;;(Because they are not sure the point of insertion point of the block is 0,0), but the new title block are confirmed (the insertion point)&lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;/P&gt;&lt;P&gt;(if (setq ss1 (ssget "_X" (list '(0 . "INSERT")&lt;BR /&gt;(cons 2 blkstr)&lt;BR /&gt;'(66 . 1)&lt;BR /&gt;(cons 410 (getvar "CTAB")))))&lt;BR /&gt;(progn&lt;BR /&gt;(setq i 0)&lt;BR /&gt;(repeat (sslength ss1)&lt;BR /&gt;(setq ent (ssname ss1 i)&lt;BR /&gt;obj (vlax-ename-&amp;gt;vla-object ent))&lt;BR /&gt;;; Get bounding box for each title block&lt;BR /&gt;(vla-getboundingbox obj 'minPt 'maxPt)&lt;BR /&gt;(setq minPt (vlax-safearray-&amp;gt;list minPt))&lt;BR /&gt;(setq maxPt (vlax-safearray-&amp;gt;list maxPt))&lt;BR /&gt;(setq leftCorner (list (car minPt) (cadr maxPt) 0)) ; Upper-left corner&lt;BR /&gt;(setq rightCorner (list (car maxPt) (cadr minPt) 0)) ; Lower-right corner&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try to add into your code..., then import the block use their insert point...(Lower-right corner)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Reply to: so for the new block you can put it on standalone block file (as wblock) and insert it at 0,0,0 in model space - yes?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;No, I think it needs to direct import to the layout. And model space is ignored. It need to construct a layoutlist for iteration. Finally, erase the old block by selection of each layout. Using for loop.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am the beginner of Autolisp. Some code I can not write, just can write some sample code. Just learn something from this forum!&lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":rolling_on_the_floor_laughing:"&gt;🤣&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":rolling_on_the_floor_laughing:"&gt;🤣&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In excel VBA, I think I am good for programming in excel, because it is easily to write the code. But in AutoCAD (VBA and lisp), to be honest, I think it is very hard to learn for programming (No record Marco for the code, but excel have).&lt;span class="lia-unicode-emoji" title=":anxious_face_with_sweat:"&gt;😰&lt;/span&gt; Also, I cant install VBA for autoCAD in my company for their security issue&lt;span class="lia-unicode-emoji" title=":fearful_face:"&gt;😨&lt;/span&gt;. So I can only autolisp to solve the problem.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jul 2025 10:44:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13722912#M165193</guid>
      <dc:creator>skchui6159</dc:creator>
      <dc:date>2025-07-13T10:44:56Z</dc:date>
    </item>
    <item>
      <title>回复： Seek a lisp to change the title block for each layout</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13722918#M165194</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14541765"&gt;@skchui6159&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think to get the minpt and maxpt, it can be done as follow code:&lt;/P&gt;&lt;P&gt;;(Because they are not sure the point of insertion point of the block is 0,0), but the new title block are confirmed (the insertion point)&lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;/P&gt;&lt;P&gt;(if (setq ss1 (ssget "_X" (list '(0 . "INSERT")&lt;BR /&gt;(cons 2 blkstr)&lt;BR /&gt;'(66 . 1)&lt;BR /&gt;(cons 410 (getvar "CTAB")))))&lt;BR /&gt;(progn&lt;BR /&gt;(setq i 0)&lt;BR /&gt;(repeat (sslength ss1)&lt;BR /&gt;(setq ent (ssname ss1 i)&lt;BR /&gt;obj (vlax-ename-&amp;gt;vla-object ent))&lt;BR /&gt;;; Get bounding box for each title block&lt;BR /&gt;(vla-getboundingbox obj 'minPt 'maxPt)&lt;BR /&gt;(setq minPt (vlax-safearray-&amp;gt;list minPt))&lt;BR /&gt;(setq maxPt (vlax-safearray-&amp;gt;list maxPt))&lt;BR /&gt;(setq leftCorner (list (car minPt) (cadr maxPt) 0)) ; Upper-left corner&lt;BR /&gt;(setq rightCorner (list (car maxPt) (cadr minPt) 0)) ; Lower-right corner&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try to add into your code..., then import the block use their insert point...(Lower-right corner)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Reply to: so for the new block you can put it on standalone block file (as wblock) and insert it at 0,0,0 in model space - yes?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;No, I think it needs to direct import to the layout. And model space is ignored. It need to construct a layoutlist for iteration. Finally, erase the old block by selection of each layout. Using for loop.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;&lt;SPAN&gt;what i meant here is to insert the new title block in model space but it could be any where (layout) you want in order to&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;&lt;SPAN&gt;extract its data (tag name + text value) and put that in a dotted pair list and i did that in my program. at the top you see&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;&lt;SPAN&gt;the function (_getAttrData AcDbBlkRef) it accept a VLA-OBJECT which is a block reference in our case the NEW title block and return a dotted pair of tag names + text value so this work is done for you - just use it.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;&lt;SPAN&gt;after you hold all the data attribute needed, all left is to loop through the existing title blocks (hold by ss1) and modify&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;&lt;SPAN&gt;each one (look at my code i did that)&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am the beginner of Autolisp. Some code I can not write, just can write some sample code. Just learn something from this forum!&lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":rolling_on_the_floor_laughing:"&gt;🤣&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":rolling_on_the_floor_laughing:"&gt;🤣&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In excel VBA, I think I am good for programming in excel, because it is easily to write the code. But in AutoCAD (VBA and lisp), to be honest, I think it is very hard to learn for programming (No record Marco for the code, but excel have).&lt;span class="lia-unicode-emoji" title=":anxious_face_with_sweat:"&gt;😰&lt;/span&gt; Also, I cant install VBA for autoCAD in my company for their security issue&lt;span class="lia-unicode-emoji" title=":fearful_face:"&gt;😨&lt;/span&gt;. So I can only autolisp to solve the problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jul 2025 10:57:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13722918#M165194</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2025-07-13T10:57:01Z</dc:date>
    </item>
    <item>
      <title>回复： Seek a lisp to change the title block for each layout</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13723199#M165196</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14541765"&gt;@skchui6159&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check this fix, it is full process (&lt;SPAN&gt;exclude the WScript this on you&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;it will work if you will be accurate in naming the "new title block"&amp;nbsp; as well as the existing block name.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;; define 3 constants&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(setq &lt;FONT color="#0000FF"&gt;NEW_TITLE_BLOCK&lt;/FONT&gt; "new title block-a4")&lt;BR /&gt;(setq &lt;FONT color="#0000FF"&gt;BLOCK_CONTAINER&lt;/FONT&gt; "new_title_block_container")&lt;BR /&gt;(setq &lt;FONT color="#0000FF"&gt;OLD_TITLE_BLOCK&lt;/FONT&gt; (strcase "old title block-a4,title block,title block1,1a32,title block 3,title block 4,a1titleblock,-title_a1_detail"))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#0000FF"&gt;BLOCK_CONTAINER &lt;FONT color="#333300"&gt;is actually "new_tiltle_block_container.dwg" (which you have to create) and inside you insert the&amp;nbsp;&lt;FONT color="#0000FF"&gt;NEW_TITLE_BLOCK &lt;FONT color="#333300"&gt;"new title block-A4" and save it in a folder that is defined in support file search path.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;study the above very carefully.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;Program Process:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;Search for existing &lt;FONT color="#0000FF"&gt;NEW_TITLE_BLOCK&lt;/FONT&gt; and delete it if exist? this to make way for the real new title block to insert.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;temporary insert &lt;FONT color="#0000FF"&gt;BLOCK_CONTAINER&lt;/FONT&gt;&amp;nbsp;in model space releasing &lt;FONT color="#0000FF"&gt;NEW_TITLE_BLOCK&amp;nbsp;&lt;FONT color="#333300"&gt;to be available for insert in all layouts.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;scan drawing for all existing title blocks (exclude model space) set to ss1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;iterate each block in ss1 selection, get bounding box of existing title blocks&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;insert &lt;FONT color="#0000FF"&gt;NEW_TITLE_BLOCK&lt;/FONT&gt;&amp;nbsp;in layout, insertion point is lower left corner of the existing (you can change it to middle point if you like)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;read existing block attributes (build dotted pair list)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#333300"&gt;apply the attribute value to &lt;FONT color="#0000FF"&gt;NEW_TITLE_BLOCK&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;&lt;SPAN&gt;erase existing title block.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;&lt;SPAN&gt;erase new title block from model space was release from BLOCK_CONTAINER&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;&lt;SPAN&gt;clean up and exit&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;&lt;SPAN&gt;enjoy&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;&lt;SPAN&gt;Moshe&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;;; Unique  -  Lee Mac
;; Returns a list with duplicate elements removed.

(defun LM:Unique ( l )
    (if l (cons (car l) (LM:Unique (vl-remove (car l) (cdr l)))))
)


(defun c:attr2attr (/ _getAttrData remove_new_title_block insert_new_title_block_container insert_new_title_block 	; local functions
		      savAttdia savAttreq savCTab NEW_TITLE_BLOCK BLOCK_CONTAINER OLD_TITLE_BLOCK ss1 ename1		; local variables
		      modelEnt AcDbBlkRef1 AcDbBlkRef2 p0 p1 attributes1 attributes2 tag2 AcDbAttrib2)			; local variables

 (defun _getAttrData (AcDbBlkRef)
  (mapcar
    (function
      (lambda (AcDbAttrib)
       (cons (strcase (vla-get-tagString AcDbAttrib)) (vla-get-textString AcDbAttrib))
      )
    ); function
   (vlax-invoke AcDbBlkRef 'GetAttributes)
  ); mapcar
 ); _getAttrData


 (defun remove_new_title_block (/ ss ename)
  (if (setq ss (ssget "_x" (list '(0 . "insert") (cons '2 NEW_TITLE_BLOCK))))
   (foreach ename (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
    (entdel ename)  
   ); foreach
  ); if
 ); remove_new_title_block


 (defun insert_new_title_block_container (/ fname)
  (if (setq fname (findfile (strcat BLOCK_CONTAINER ".dwg")))
   (progn
    (command "._insert" (strcat "*" fname) "0,0,0" 1 0)
    (entlast)
   ); progn
   (prompt (strcat "\nContainer block " BLOCK_CONTAINER " is not exist."))
  ); if
 ); insert_new_title_block_container

  
 (defun insert_new_title_block (base / fname)
  (if (tblsearch "block" NEW_TITLE_BLOCK)
   (progn
    (command "._insert" NEW_TITLE_BLOCK base 1 1 0)
    T
   ); progn
   (prompt (strcat "\nBlock " NEW_TITLE_BLOCK " is not exist."))
  ); if
 ); insert_new_title_block
  
  
 ; here start c:attr2attr
 (setvar "cmdecho" 0)
 (command "._undo" "_begin")

 (setq savAttdia (getvar "attdia"))
 (setq savAttreq (getvar "attreq"))

 (setvar "attdia" 0)
 (setvar "attreq" 0)

 (setq savCTab (getvar "ctab"))

 (setq NEW_TITLE_BLOCK "new title block-a4")
 (setq BLOCK_CONTAINER "new_title_block_container")
 (setq OLD_TITLE_BLOCK (strcase "old title block-a4,title block,title block1,1a32,title block 3,title block 4,a1titleblock,-title_a1_detail"))

 ; delete new title block if exist?
 (remove_new_title_block)
 (setvar "ctab" "Model")

 ; select existing title blocks, reject from model space
 (if (and
      (setq modelEnt (insert_new_title_block_container))  ; insert new title block container
      (setq ss1 (ssget "_x" (list '(0 . "insert") (cons '2 (strcat OLD_TITLE_BLOCK ",`*U*")) (cons '410 "~Model"))))
     )
  (progn
   (foreach ename1 (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss1)))
    (setq AcDbBlkRef1 (vlax-ename-&amp;gt;vla-object ename1))

    (if (wcmatch (strcase (vla-get-effectiveName AcDbBlkRef1)) OLD_TITLE_BLOCK)
     (progn
      (vla-getBoundingBox AcDbBlkRef1 'minpt 'maxpt)
      (setq p0 (vlax-safearray-&amp;gt;list minpt))
      (setq p1 (vlax-safearray-&amp;gt;list maxpt))

      (setvar "ctab" (cdr (assoc '410 (entget ename1))))
      (command "._pspace")

      (if (insert_new_title_block p0) 	; insert new title block
       (progn
        (setq AcDbBlkRef2 (vlax-ename-&amp;gt;vla-object (entlast)))
        (setq attributes1 (LM:Unique (_getAttrData AcDbBlkRef1)))    

        (foreach AcDbAttrib2 (setq attributes2 (vlax-invoke AcDbBlkRef2 'GetAttributes))
         (setq tag2 (strcase (vla-get-tagString AcDbAttrib2)))
         (if (setq dat (assoc tag2 attributes1))
          (vla-put-textString AcDbAttrib2 (cdr dat))
         ); if
        ); foreach

        (foreach o attributes2
         (vlax-release-object o)
        )

        (vlax-release-object AcDbBlkRef2)
       ); progn
      ); if
      
     ); progn
    ); if
     
    (vla-delete AcDbBlkRef1) ; delete old title block
    (vlax-release-object AcDbBlkRef1) 
   ); foreach
  ); progn
 ); if

 ; delete origin block
 (if modelEnt
  (entdel modelEnt)
 )
  
 (setvar "ctab" savCTab)
  
 (setvar "attreq" savAttreq)
 (setvar "attdia" savAttdia)

 (command "._undo" "_end")
 (setvar "cmdecho" 1)
  
 (princ "\nDone.")
 (princ)
); c:attr2attr&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jul 2025 21:09:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13723199#M165196</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2025-07-13T21:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Seek a lisp to change the title block for each layout</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13723250#M165199</link>
      <description>&lt;P&gt;Just a comment we had a old title block and a new one was made, it had the same name as the old one and matched attributes etc all you had to was insert the new one and CAD asked "do you want to redefine". Then was all done. May be a simpler way for 4000 dwg's maybe test.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jul 2025 23:08:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13723250#M165199</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2025-07-13T23:08:40Z</dc:date>
    </item>
    <item>
      <title>回复： Seek a lisp to change the title block for each layout</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13723438#M165202</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp;Seem not work in my computer. But thank you very much!&lt;span class="lia-unicode-emoji" title=":flexed_biceps:"&gt;💪&lt;/span&gt; I have also write two lisp for this issue.&lt;/P&gt;&lt;P&gt;First, output to csv, then insert the block by insert.lsp (inprogress). But, Need to load "steal" and "delete_block" from Lee Mac.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jul 2025 03:28:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13723438#M165202</guid>
      <dc:creator>skchui6159</dc:creator>
      <dc:date>2025-07-14T03:28:33Z</dc:date>
    </item>
    <item>
      <title>回复： Seek a lisp to change the title block for each layout</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13723440#M165203</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;How can you do that?&lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jul 2025 03:26:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13723440#M165203</guid>
      <dc:creator>skchui6159</dc:creator>
      <dc:date>2025-07-14T03:26:23Z</dc:date>
    </item>
    <item>
      <title>回复： Seek a lisp to change the title block for each layout</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13723560#M165204</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14541765"&gt;@skchui6159&lt;/a&gt;&amp;nbsp; hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good morning, i take back the&amp;nbsp;&lt;SPAN&gt;BLOCK_CONTAINER thing (maybe i thought on some other options last night and over sleep night&amp;nbsp; i realized it is not needed&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;) so attached is an update. the change from your side is save the "new title block-a4" as standalone dwg file (block) in a folder that is on support files search path.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Moshe&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jul 2025 06:11:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13723560#M165204</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2025-07-14T06:11:24Z</dc:date>
    </item>
    <item>
      <title>回复： Seek a lisp to change the title block for each layout</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13723612#M165205</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp;Sorry, I can not run..&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="skchui6159_0-1752475646046.png" style="width: 557px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1552094iC144D32C2BE42456/image-dimensions/557x66?v=v2" width="557" height="66" role="button" title="skchui6159_0-1752475646046.png" alt="skchui6159_0-1752475646046.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="skchui6159_1-1752475685873.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1552095i7023F9AFEA38645C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="skchui6159_1-1752475685873.png" alt="skchui6159_1-1752475685873.png" /&gt;&lt;/span&gt;, what is the problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jul 2025 06:48:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13723612#M165205</guid>
      <dc:creator>skchui6159</dc:creator>
      <dc:date>2025-07-14T06:48:46Z</dc:date>
    </item>
    <item>
      <title>回复： Seek a lisp to change the title block for each layout</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13723642#M165206</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14541765"&gt;@skchui6159&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached attr2attr.zip contain 3 files:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;attr2attr.lsp&lt;/P&gt;&lt;P&gt;"NEW BLANK BLOCK_A.dwg" - the file to run the lisp inside 3 "old&amp;nbsp;TITLE BLOCK-A4" inserted with attribute with numbers as value - yes?!&lt;/P&gt;&lt;P&gt;1 in model space&lt;/P&gt;&lt;P&gt;1 in layout1&lt;/P&gt;&lt;P&gt;1 in layout2&lt;/P&gt;&lt;P&gt;"new TITLE BLOCK-A4.dwg"&amp;nbsp; &amp;nbsp;- the new title block to replace.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i want you to do is to release this zip file in your current working folder.&lt;/P&gt;&lt;P&gt;open&amp;nbsp;&amp;nbsp;"NEW BLANK BLOCK_A.dwg".&lt;/P&gt;&lt;P&gt;load attr2atttr.lsp.&lt;/P&gt;&lt;P&gt;run the command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result:&lt;/P&gt;&lt;P&gt;The blocks&amp;nbsp; "old&amp;nbsp;TITLE BLOCK-A4" from layout1 + layout2 were replaced with&amp;nbsp;"new TITLE BLOCK-A4.dwg"&amp;nbsp; attributes value copied.&lt;/P&gt;&lt;P&gt;the block in model space is left intact&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please do only that and reply if it also working for you?&lt;/P&gt;&lt;P&gt;we need to do it in steps, please do not go to your next steps WScript or blending it in your code cause i have not control on that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;agree?&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jul 2025 07:16:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13723642#M165206</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2025-07-14T07:16:05Z</dc:date>
    </item>
    <item>
      <title>回复： Seek a lisp to change the title block for each layout</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13724168#M165212</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The lisp works ok to transfer data!&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&amp;nbsp;It is ok for A4 title block.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;we need to do it in steps, please do not go to your next steps WScript or blending it in your code cause i have not control on that.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sure&lt;span class="lia-unicode-emoji" title=":grinning_squinting_face:"&gt;😆&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jul 2025 14:11:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13724168#M165212</guid>
      <dc:creator>skchui6159</dc:creator>
      <dc:date>2025-07-14T14:11:35Z</dc:date>
    </item>
    <item>
      <title>回复： Seek a lisp to change the title block for each layout</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13724202#M165213</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14541765"&gt;@skchui6159&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To give support for other blocks like "new title block-A1" you could change the NEW_TITLE_BLOCK value and change OLD_TITLE_BLOCK value to include the old A1 title blocks names.&lt;/P&gt;&lt;P&gt;if you want this to handle A4 + A1 on one run, could be done but i need to make some changes to code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jul 2025 14:29:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13724202#M165213</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2025-07-14T14:29:56Z</dc:date>
    </item>
    <item>
      <title>回复： Seek a lisp to change the title block for each layout</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13724492#M165214</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14541765"&gt;@skchui6159&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ok this one support A4 + A1 in one run&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the change is:&lt;/P&gt;&lt;P&gt;(setq TITLE_BLOCK_A4 (cons "new title block-a4" (strcase "old title block-a4,title block,title block1,title block 3,title block 4")))&lt;BR /&gt;(setq TITLE_BLOCK_A1 (cons "new title block-a1" (strcase "old title block-a1,1a32,a1titleblock,-title_a1_detail")))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;two consts one for A4 and one for A1&lt;/P&gt;&lt;P&gt;each is a dotted pair list where the first item is the new title block name the second item is old title blocks name&lt;/P&gt;&lt;P&gt;assuming a layout has one title block,&amp;nbsp;the program will look first for "old title block-a4" and if found, modify it than&lt;/P&gt;&lt;P&gt;continue to next layout (e.g does not look for "old title block-a1" in current layout) but if a4 is not found and a1 does, it will modify it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;enjoy&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jul 2025 18:29:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13724492#M165214</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2025-07-14T18:29:26Z</dc:date>
    </item>
    <item>
      <title>回复： Seek a lisp to change the title block for each layout</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13724690#M165216</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for you help, also I want to ask, what should I put in the zip for A1 and A4 running the lisp?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jul 2025 21:25:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-the-title-block-for-each-layout/m-p/13724690#M165216</guid>
      <dc:creator>skchui6159</dc:creator>
      <dc:date>2025-07-14T21:25:39Z</dc:date>
    </item>
  </channel>
</rss>

