<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>CAD Forum discussion (EN) : Rename Layout tab to Attribute</title>
  <link>https://www.cadforum.cz/forum_en/</link>
  <description><![CDATA[This is an XML content feed of; CAD Forum discussion (EN) : AutoCAD : Rename Layout tab to Attribute]]></description>
  <pubDate>Sun, 31 May 2026 21:38:50 +0000</pubDate>
  <lastBuildDate>Mon, 26 Aug 2019 07:44:31 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://www.cadforum.cz/forum_en/RSS_post_feed.asp?TID=13266</WebWizForums:feedURL>
  <image>
   <title><![CDATA[CAD Forum discussion (EN)]]></title>
   <url>https://www.cadforum.cz/forum_en/forum_images/web_wiz_forums.png</url>
   <link>https://www.cadforum.cz/forum_en/</link>
  </image>
  <item>
   <title><![CDATA[Rename Layout tab to Attribute :  So you are saying the switching...]]></title>
   <link>https://www.cadforum.cz/forum_en/forum_posts.asp?TID=13266&amp;PID=37109&amp;title=rename-layout-tab-to-attribute#37109</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.cadforum.cz/forum_en/member_profile.asp?PF=3">Vladimir Michl</a><br /><strong>Subject:</strong> 13266<br /><strong>Posted:</strong> 26.Aug.2019 at 07:44<br /><br />So you are saying the switching back and forth does update the tab name - as it should. Where is the intermittency?<div>&nbsp;</div><div>Does it behave like in the video?</div><div><a href="https://www.cadforum.cz/cadforum_en/how-to-rename-layouts-by-a-specific-attribute-of-the-title-block-tip11780" rel="nofollow">https://www.cadforum.cz/cadforum_en/how-to-rename-layouts-by-a-specific-attribute-of-the-title-block-tip11780</a></div>]]>
   </description>
   <pubDate>Mon, 26 Aug 2019 07:44:31 +0000</pubDate>
   <guid isPermaLink="true">https://www.cadforum.cz/forum_en/forum_posts.asp?TID=13266&amp;PID=37109&amp;title=rename-layout-tab-to-attribute#37109</guid>
  </item> 
  <item>
   <title><![CDATA[Rename Layout tab to Attribute : Thanks for the replay!Block names...]]></title>
   <link>https://www.cadforum.cz/forum_en/forum_posts.asp?TID=13266&amp;PID=37108&amp;title=rename-layout-tab-to-attribute#37108</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.cadforum.cz/forum_en/member_profile.asp?PF=777214">SLING4</a><br /><strong>Subject:</strong> 13266<br /><strong>Posted:</strong> 26.Aug.2019 at 07:11<br /><br />Thanks for the replay!<div>Block names are correct and it does work. Problem is that it doesn't always update the layout tab when I change the attribute.</div><div>When I open the file, it does update, but not while it's open.</div><div><br></div><div>As mentioned:</div><div>"It's working <b>intermittently</b>. I found that when I manually change the layout tab name to something random, then switch to model space and back to layout, the tab name updates. REGENALL also doesn't update the tab name."</div>]]>
   </description>
   <pubDate>Mon, 26 Aug 2019 07:11:16 +0000</pubDate>
   <guid isPermaLink="true">https://www.cadforum.cz/forum_en/forum_posts.asp?TID=13266&amp;PID=37108&amp;title=rename-layout-tab-to-attribute#37108</guid>
  </item> 
  <item>
   <title><![CDATA[Rename Layout tab to Attribute : Please make sure the block and...]]></title>
   <link>https://www.cadforum.cz/forum_en/forum_posts.asp?TID=13266&amp;PID=37097&amp;title=rename-layout-tab-to-attribute#37097</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.cadforum.cz/forum_en/member_profile.asp?PF=3">Vladimir Michl</a><br /><strong>Subject:</strong> 13266<br /><strong>Posted:</strong> 19.Aug.2019 at 06:34<br /><br />Please make sure the block and attribute names in the routine match the names used in your title block.<div><br></div><div>And where is the problem? Your tab name updates? Its should update.</div>]]>
   </description>
   <pubDate>Mon, 19 Aug 2019 06:34:57 +0000</pubDate>
   <guid isPermaLink="true">https://www.cadforum.cz/forum_en/forum_posts.asp?TID=13266&amp;PID=37097&amp;title=rename-layout-tab-to-attribute#37097</guid>
  </item> 
  <item>
   <title><![CDATA[Rename Layout tab to Attribute : Hi allI&amp;#039;m new here.I have...]]></title>
   <link>https://www.cadforum.cz/forum_en/forum_posts.asp?TID=13266&amp;PID=37096&amp;title=rename-layout-tab-to-attribute#37096</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.cadforum.cz/forum_en/member_profile.asp?PF=777214">SLING4</a><br /><strong>Subject:</strong> 13266<br /><strong>Posted:</strong> 19.Aug.2019 at 02:31<br /><br />Hi all<div>I'm new here.</div><div>I have a modified LISP routine from V.Mich (which I love).</div><div>It's working intermittently. I found that when I manually change the layout tab name to something random, then switch to model space and back to layout, the tab name updates. REGENALL also doesn't update the tab name.</div><div><br></div><div>I use 3 attributes for the naming. i.e. _LOAattname "REV";&nbsp;_LOAprefix "PREFIX";&nbsp;_LOAsuffix "SUFFIX"</div><div>This gives me a result e.g. &#091;A&#093;</div><div><br></div><div>I'll really appreciate any comments!</div><div><br></div><div><b><u>Routine:</u></b></div><div><br></div><div><div>;Change layout name dynamically by attribute value</div><div>;V.Michl - www.cadstudio.cz - www.cadforum.cz</div><div><br></div><div>(setq _LOAblkname "AA_TITLEBLOCK") ; preset your title block name</div><div>(setq _LOAattname "REV") ; preset your att. tag for the attribute carrying the requested layout name</div><div>(setq _LOAprefix "PREFIX") ; sets prefix</div><div>(setq _LOAsuffix "SUFFIX") ; sets suffix</div><div>(vl-load-com)</div><div><br></div><div>(setq _LOAdoc (vla-get-activedocument (vlax-get-acad-object)))</div><div><br></div><div>(defun _LOAgetAttVal (lname / ss blk property)</div><div>&nbsp;(defun vl-getattributevalue ( blk tag )</div><div>&nbsp; &nbsp; (setq tag (strcase tag))</div><div>&nbsp; &nbsp; (vl-some '(lambda ( att ) (if (= tag (strcase (vla-get-tagstring att))) (vla-get-textstring att)))</div><div>&nbsp; &nbsp; &nbsp; &nbsp; (vlax-invoke blk 'getattributes)</div><div>&nbsp; &nbsp; )</div><div>&nbsp;) ;----</div><div>&nbsp;(defun ssdynblk (effname / ssx c en blk) ;--------- *U modified dynblk</div><div>&nbsp; (setq ssx (ssget "_X" (list (cons 0 "INSERT")(cons 2 "`*U*")(cons 410 lname))))</div><div>&nbsp; (setq<span style="white-space:pre">	</span>c 0)</div><div>&nbsp; (if ssx</div><div><span style="white-space:pre">	</span>(repeat<span style="white-space:pre">	</span>(sslength ssx)</div><div><span style="white-space:pre">	</span>&nbsp; (setq<span style="white-space:pre">	</span>en (vlax-ename-&gt;vla-object (ssname ssx c))&nbsp; c (1+ c))</div><div><span style="white-space:pre">	</span>&nbsp; (if (= (strcase (vla-get-effectivename en)) (strcase effname))</div><div><span style="white-space:pre">		</span>(setq blk en)</div><div><span style="white-space:pre">	</span>&nbsp; )</div><div><span style="white-space:pre">	</span>)</div><div>&nbsp; )</div><div>&nbsp; blk</div><div>&nbsp;) ;----</div><div><br></div><div>&nbsp;(setq ss (ssget "_X" (list (cons 0 "INSERT")(cons 2 _LOAblkname)(cons 410 lname))))</div><div>&nbsp;(if ss</div><div><span style="white-space:pre">	</span>(setq blk (vlax-ename-&gt;vla-object (ssname ss 0)))</div><div><span style="white-space:pre">	</span>(setq blk (ssdynblk _LOAblkname)) ; dynblocks, slow...</div><div>&nbsp;)</div><div>; (if blk (setq property (vl-getattributevalue blk _LOAattname)))</div><div>&nbsp;(if blk (setq property (strcat (vl-getattributevalue blk _LOAprefix) (vl-getattributevalue blk _LOAattname) (vl-getattributevalue blk _LOAsuffix)))) ; adds prefix &amp; suffix</div><div>&nbsp;property</div><div>)</div><div><br></div><div>(defun _LOAchangedLayout (reactor layout / actl lname aname) ; single layout</div><div>&nbsp;(setq lname (getvar "CTAB")); (car layout) ; act.layout</div><div>&nbsp;(setq actl (vla-get-activelayout _LOAdoc)) ; vla-get-name</div><div>&nbsp;(if (/= lname "Model")(progn</div><div>&nbsp; (setq aname (_LOAgetAttVal lname)) ; get attribute</div><div>&nbsp; (if (and aname (/= lname aname)) (progn (vla-put-name actl aname)(princ " * LOA renamed * "))) ; rename</div><div>&nbsp;))</div><div>)</div><div><br></div><div>(defun _LOAprocess (reactor layout / ol actl lname aname) ; all layouts</div><div>&nbsp;(setq ol (getvar "CTAB")); (car layout) ; act.layout</div><div>&nbsp;(foreach lay (layoutlist)</div><div>&nbsp; (setvar "CTAB" lay)</div><div>&nbsp; (setq actl (vla-get-activelayout _LOAdoc))</div><div>&nbsp; (setq aname (_LOAgetAttVal lay)) ; get attribute</div><div>&nbsp; (if (and aname (/= lay aname)) (progn (vla-put-name actl aname)(if (= ol lay)(setq ol aname))(princ " * LOA renamed * "))) ; rename</div><div>&nbsp; (setvar "CTAB" ol)</div><div>&nbsp;)</div><div>)</div><div><br></div><div>(defun C:LOAoff ( )</div><div>&nbsp;(if #LayoutSwitcher# (progn (vlr-remove #LayoutSwitcher#)(setq #LayoutSwitcher# nil)))</div><div>&nbsp;(if #CommandEnded# (progn (vlr-remove #CommandEnded#)(setq #CommandEnded# nil)))</div><div>&nbsp;(princ "\nNow OFF")</div><div>&nbsp;(princ)</div><div>)</div><div>(defun C:LOAon ( )</div><div>&nbsp;(if(not #LayoutSwitcher#) (setq #LayoutSwitcher# (VLR-Miscellaneous-Reactor nil '((:VLR-layoutSwitched . _LOAchangedLayout))))) ; on layout change</div><div>&nbsp;(if(not #CommandEnded#) (setq #CommandEnded# (VLR-Command-Reactor nil '((:VLR-commandEnded . _LOAchangedLayout))))) ; and on any command (UNCOMMENT)</div><div>&nbsp;;(if(not #CommandEnded#) (setq #CommandEnded# (vlr-editor-reactor nil '((:vlr-endDwgOpen . _LOAprocess)(:vlr-beginSave . _LOAprocess)(:vlr-beginDxfOut . _LOAprocess))))) ; and on open/save (UNCOMMENT)</div><div>&nbsp;(_LOAchangedLayout nil nil)</div><div>&nbsp;(princ "\nNow ON")</div><div>&nbsp;(princ)</div><div>)</div><div><br></div><div>(princ "\nLOA reactor loaded.")</div><div>(C:LOAon)</div><div>(princ)</div><div><br></div></div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Mon, 19 Aug 2019 02:31:40 +0000</pubDate>
   <guid isPermaLink="true">https://www.cadforum.cz/forum_en/forum_posts.asp?TID=13266&amp;PID=37096&amp;title=rename-layout-tab-to-attribute#37096</guid>
  </item> 
 </channel>
</rss>