<?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 Remove suffix's from Blocks names in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/remove-suffix-s-from-blocks-names/m-p/10064234#M85864</link>
    <description>&lt;P&gt;I keep receiving plans we very long layer and block names and the CAFM system we use only support 64 character blocks&lt;/P&gt;&lt;P&gt;For example a plan&amp;nbsp; I have at the moment all the blocks end with "-AL_72_01 Furniture _ Fittings Ground Floor", but can vary from plan to plan and sometime within the plans i,e, there may be 2 multiple suffixes of varying length.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DO anyone know a quick way, or has a handy lisp/code that would say rename Blocks and Layers by removing say "-AL*" where * is a wild card&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 07 Feb 2021 10:10:39 GMT</pubDate>
    <dc:creator>gabrielUMFVH</dc:creator>
    <dc:date>2021-02-07T10:10:39Z</dc:date>
    <item>
      <title>Remove suffix's from Blocks names</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/remove-suffix-s-from-blocks-names/m-p/10064234#M85864</link>
      <description>&lt;P&gt;I keep receiving plans we very long layer and block names and the CAFM system we use only support 64 character blocks&lt;/P&gt;&lt;P&gt;For example a plan&amp;nbsp; I have at the moment all the blocks end with "-AL_72_01 Furniture _ Fittings Ground Floor", but can vary from plan to plan and sometime within the plans i,e, there may be 2 multiple suffixes of varying length.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DO anyone know a quick way, or has a handy lisp/code that would say rename Blocks and Layers by removing say "-AL*" where * is a wild card&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Feb 2021 10:10:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/remove-suffix-s-from-blocks-names/m-p/10064234#M85864</guid>
      <dc:creator>gabrielUMFVH</dc:creator>
      <dc:date>2021-02-07T10:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Remove suffix's from Blocks names</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/remove-suffix-s-from-blocks-names/m-p/10064273#M85865</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I suggest to use &lt;STRONG&gt;RENAME&lt;/STRONG&gt; command with&amp;nbsp;&lt;A href="https://knowledge.autodesk.com/support/autocad-lt/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/AutoCAD-LT/files/GUID-68373F99-17F1-4AC4-8D37-184C49164705-htm.html" target="_blank" rel="noopener"&gt;Wild-Card&lt;/A&gt; Characters . also you can try this outsource plugin &lt;A href="https://www.cadforum.cz/cadforum_en/rename-on-steroids-complex-renaming-of-autocad-objects-tip9265" target="_blank" rel="noopener"&gt;here&lt;/A&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, 07 Feb 2021 10:44:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/remove-suffix-s-from-blocks-names/m-p/10064273#M85865</guid>
      <dc:creator>imadHabash</dc:creator>
      <dc:date>2021-02-07T10:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Remove suffix's from Blocks names</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/remove-suffix-s-from-blocks-names/m-p/10064284#M85866</link>
      <description>Hi&lt;BR /&gt;RENAME doesn't appear to work for Suffixes, I use it to Rename for Prefixes&lt;BR /&gt;Unless I doing something wrong, the following doesn't work&lt;BR /&gt;[cid:image001.png@01D6FD3F.DA86C280]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 07 Feb 2021 10:57:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/remove-suffix-s-from-blocks-names/m-p/10064284#M85866</guid>
      <dc:creator>gabrielUMFVH</dc:creator>
      <dc:date>2021-02-07T10:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Remove suffix's from Blocks names</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/remove-suffix-s-from-blocks-names/m-p/10066318#M85867</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3737772"&gt;@gabrielUMFVH&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;.... the following doesn't work&lt;BR /&gt;[cid:image001.png@01D6FD3F.DA86C280]&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The "following" didn't come through.&amp;nbsp; Can you try again?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 12:31:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/remove-suffix-s-from-blocks-names/m-p/10066318#M85867</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-02-08T12:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Remove suffix's from Blocks names</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/remove-suffix-s-from-blocks-names/m-p/10066372#M85868</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3737772"&gt;@gabrielUMFVH&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;DO anyone know a quick way, or has a handy lisp/code that would say rename Blocks and Layers by removing say "-AL*" where * is a wild card&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Try this [&lt;EM&gt;minimally&lt;/EM&gt; tested]:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(vl-load-com)
(defun C:BNT-AL ; = Block Name Truncate, removing "-AL" and following
  (/ blk old pos new inc newsuf)
  (while (setq blk (tblnext "block" (not blk)))
    (setq old (cdr (assoc 2 blk)))
    (if (setq pos (vl-string-search "-AL" old))
      (progn ; then
        (setq
          new (substr old 1 pos)
          inc 1
        ); setq
        (if (tblsearch "block" new); same truncated name already exists
          (progn ; then
            (setq newsuf (strcat new (itoa inc)))
            (while (tblsearch "block" newsuf)
              (setq newsuf (strcat new (itoa (setq inc (1+ inc)))))
            ); while
            (setq new newsuf)
          ); progn
        ); if
        (command "_.rename" "block" old new)
      ); progn
    ); if
  ); while
  (princ)
); defun&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 13:02:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/remove-suffix-s-from-blocks-names/m-p/10066372#M85868</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-02-08T13:02:11Z</dc:date>
    </item>
  </channel>
</rss>

