<?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: increment help please in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/increment-help-please/m-p/12949675#M10492</link>
    <description>&lt;P&gt;Just realized I should mention that the block name is auto generated from the a couple attributes.&amp;nbsp; Thinking out loud, I guess I need to make that name (BlkNm),&amp;nbsp; wildcard match it against the block collection, if exists get the biggest #, then make one the next number up.&amp;nbsp; Does that sound right??&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Aug 2024 15:43:12 GMT</pubDate>
    <dc:creator>Village_Idiot</dc:creator>
    <dc:date>2024-08-09T15:43:12Z</dc:date>
    <item>
      <title>increment help please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/increment-help-please/m-p/12949503#M10487</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;while&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;tblsearch&lt;/SPAN&gt; &lt;SPAN&gt;"block"&lt;/SPAN&gt;&lt;SPAN&gt; BlkNm) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (&lt;/SPAN&gt;&lt;SPAN&gt;setq&lt;/SPAN&gt;&lt;SPAN&gt; BlkNm (&lt;/SPAN&gt;&lt;SPAN&gt;strcat&lt;/SPAN&gt;&lt;SPAN&gt; BlkNm &lt;/SPAN&gt;&lt;SPAN&gt;"_V"&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;itoa&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;setq&lt;/SPAN&gt;&lt;SPAN&gt; tmp (&lt;/SPAN&gt;&lt;SPAN&gt;1+&lt;/SPAN&gt;&lt;SPAN&gt; tmp)))))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If there are no blocks equal to BlkNm its fine.&amp;nbsp; Same with first instance. But then...&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;BlkNm_V1_V2_V3_V4_V5_V6&amp;nbsp; &amp;nbsp;Yeh...NOPE!&amp;nbsp; How can I get it to add _V1 and then increment after that?&lt;/DIV&gt;</description>
      <pubDate>Fri, 09 Aug 2024 14:26:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/increment-help-please/m-p/12949503#M10487</guid>
      <dc:creator>Village_Idiot</dc:creator>
      <dc:date>2024-08-09T14:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: increment help please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/increment-help-please/m-p/12949543#M10488</link>
      <description>&lt;P&gt;how could you manage to get more than ONE block definition with the name '&lt;SPAN&gt;BlkNm'? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;or?&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(if (tblsearch "block" BlkNm)
	(setq BlkNm (strcat BlkNm "_V" (itoa (setq tmp (1+ tmp)))))
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2024 14:44:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/increment-help-please/m-p/12949543#M10488</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2024-08-09T14:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: increment help please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/increment-help-please/m-p/12949547#M10489</link>
      <description>&lt;P&gt;While you wait... this freebie does that and so much more&lt;BR /&gt;&lt;A href="https://apps.autodesk.com/ACD/en/Detail/Index?id=8051485828049059617&amp;amp;appLang=en&amp;amp;os=Win32_64" target="_blank"&gt;https://apps.autodesk.com/ACD/en/Detail/Index?id=8051485828049059617&amp;amp;appLang=en&amp;amp;os=Win32_64&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pendean_0-1723214714575.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1396328i4A6CC584494899A5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pendean_0-1723214714575.png" alt="pendean_0-1723214714575.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pendean_1-1723214739521.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1396329i01ACE975FC03CE43/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pendean_1-1723214739521.png" alt="pendean_1-1723214739521.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2024 14:45:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/increment-help-please/m-p/12949547#M10489</guid>
      <dc:creator>pendean</dc:creator>
      <dc:date>2024-08-09T14:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: increment help please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/increment-help-please/m-p/12949650#M10490</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13423916"&gt;@komondormrex&lt;/a&gt;, but I want it to keep looping until it finds the next available V#.&amp;nbsp; Its part of a larger lisp that makes attributed blocks for a library.&amp;nbsp; If that name already exists I want to add a new version.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2024 15:29:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/increment-help-please/m-p/12949650#M10490</guid>
      <dc:creator>Village_Idiot</dc:creator>
      <dc:date>2024-08-09T15:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: increment help please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/increment-help-please/m-p/12949655#M10491</link>
      <description>&lt;P&gt;I think you would need a "base" name part separate from the BlkNm variable itself, something like this &lt;EM&gt;[untested]&lt;/EM&gt;:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(setq
  BlkBase "Whatever"
  BlkNm BlkBase ; start without _V# suffix
  tmp 0
); setq
(while (tblsearch "block" BlkNm)
  (setq BlkNm (strcat BlkBase "_V" (itoa (setq tmp (1+ tmp))))
); while
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2024 15:29:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/increment-help-please/m-p/12949655#M10491</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-08-09T15:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: increment help please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/increment-help-please/m-p/12949675#M10492</link>
      <description>&lt;P&gt;Just realized I should mention that the block name is auto generated from the a couple attributes.&amp;nbsp; Thinking out loud, I guess I need to make that name (BlkNm),&amp;nbsp; wildcard match it against the block collection, if exists get the biggest #, then make one the next number up.&amp;nbsp; Does that sound right??&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2024 15:43:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/increment-help-please/m-p/12949675#M10492</guid>
      <dc:creator>Village_Idiot</dc:creator>
      <dc:date>2024-08-09T15:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: increment help please</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/increment-help-please/m-p/12949727#M10493</link>
      <description>&lt;P&gt;You&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;, are the big winner.&amp;nbsp; Worked like a charm.&amp;nbsp; Thank you sooooo very much!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;setq&lt;/SPAN&gt;&lt;SPAN&gt; BlkNm ("SuperDupperBlockalicious"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BlkNmDitto BlkNm)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (&lt;/SPAN&gt;&lt;SPAN&gt;while&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;tblsearch&lt;/SPAN&gt; &lt;SPAN&gt;"block"&lt;/SPAN&gt;&lt;SPAN&gt; BlkNm) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (&lt;/SPAN&gt;&lt;SPAN&gt;setq&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BlkNm (&lt;/SPAN&gt;&lt;SPAN&gt;strcat&lt;/SPAN&gt;&lt;SPAN&gt; BlkNmDitto &lt;/SPAN&gt;&lt;SPAN&gt;"_V"&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;itoa&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;setq&lt;/SPAN&gt;&lt;SPAN&gt; tmp (&lt;/SPAN&gt;&lt;SPAN&gt;1+&lt;/SPAN&gt;&lt;SPAN&gt; tmp)))))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 09 Aug 2024 16:15:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/increment-help-please/m-p/12949727#M10493</guid>
      <dc:creator>Village_Idiot</dc:creator>
      <dc:date>2024-08-09T16:15:32Z</dc:date>
    </item>
  </channel>
</rss>

