<?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: If function won't recognize nil value string variable in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/if-function-won-t-recognize-nil-value-string-variable/m-p/12671157#M15900</link>
    <description>&lt;P&gt;If you use say getstring and press Enter you will get "" a string with nothing in it, a getreal press enter will return nil.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if that helps.&lt;/P&gt;</description>
    <pubDate>Thu, 28 Mar 2024 04:34:36 GMT</pubDate>
    <dc:creator>Sea-Haven</dc:creator>
    <dc:date>2024-03-28T04:34:36Z</dc:date>
    <item>
      <title>If function won't recognize nil value string variable</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/if-function-won-t-recognize-nil-value-string-variable/m-p/12664957#M15892</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a lisp that extracts values from a csv, writes them to variables and updates existing blocks, which it is thankfully doing. The problem is that it is supposed to skip sub-functions when it encounters blank entries in the csv, but it won't recognize the nil-value variables. I've had it pause and princ the value and type of the variable, which is set to a nil string.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried&lt;/P&gt;&lt;P&gt;(if (eq RES_1_ADDRv nil)&lt;/P&gt;&lt;P&gt;(if (not (eq&amp;nbsp;RES_1_ADDRv nil))&lt;/P&gt;&lt;P&gt;(if (/=&amp;nbsp;RES_1_ADDRv nil)&lt;/P&gt;&lt;P&gt;(if (null&amp;nbsp;RES_1_ADDRv)&lt;/P&gt;&lt;P&gt;(if (not (null&amp;nbsp;RES_1_ADDRv)),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;flipping the order of the subsequent then/else as appropriate. Is there an = or /= equivalent function specific to strings that I should be using?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(RES_1_ADDRv is global variable)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Gorra&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 22:31:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/if-function-won-t-recognize-nil-value-string-variable/m-p/12664957#M15892</guid>
      <dc:creator>Gorra</dc:creator>
      <dc:date>2024-03-25T22:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: If function won't recognize nil value string variable</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/if-function-won-t-recognize-nil-value-string-variable/m-p/12664962#M15893</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14002716"&gt;@Gorra&lt;/a&gt;&amp;nbsp;Are you sure that the "nil" values aren't actually empty strings "" ?&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;(= RES_1_ADDRv "")&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;FWIW:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;;; This
(if (eq res_1_addrv nil))
;; is the same as this
(if (null res_1_addrv))
;; as the same as this
(if (not res_1_addrv))
;; can be simplified to this
(if res_1_addrv)
&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 25 Mar 2024 22:48:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/if-function-won-t-recognize-nil-value-string-variable/m-p/12664962#M15893</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2024-03-25T22:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: If function won't recognize nil value string variable</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/if-function-won-t-recognize-nil-value-string-variable/m-p/12664984#M15894</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/593837"&gt;@ronjonp&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I started out using "", but I'll try the assorted permutations with "" to make sure.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Not recognizing as "" either.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Gorra&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 22:50:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/if-function-won-t-recognize-nil-value-string-variable/m-p/12664984#M15894</guid>
      <dc:creator>Gorra</dc:creator>
      <dc:date>2024-03-25T22:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: If function won't recognize nil value string variable</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/if-function-won-t-recognize-nil-value-string-variable/m-p/12664991#M15895</link>
      <description>&lt;P&gt;If you're using the VLIDE, debug using a watch and break point on the variable to see what value it holds.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ronjonp_0-1711407280599.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1341615i63DBA81DF3B345CF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ronjonp_0-1711407280599.png" alt="ronjonp_0-1711407280599.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 22:55:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/if-function-won-t-recognize-nil-value-string-variable/m-p/12664991#M15895</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2024-03-25T22:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: If function won't recognize nil value string variable</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/if-function-won-t-recognize-nil-value-string-variable/m-p/12664994#M15896</link>
      <description>&lt;P&gt;I will try it simplified and see if that works&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 22:59:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/if-function-won-t-recognize-nil-value-string-variable/m-p/12664994#M15896</guid>
      <dc:creator>Gorra</dc:creator>
      <dc:date>2024-03-25T22:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: If function won't recognize nil value string variable</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/if-function-won-t-recognize-nil-value-string-variable/m-p/12664999#M15897</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/593837"&gt;@ronjonp&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it can give me that information, I will get VLIDE directly and check. Or is that the one embedded in AutoCad?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gorra&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 23:01:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/if-function-won-t-recognize-nil-value-string-variable/m-p/12664999#M15897</guid>
      <dc:creator>Gorra</dc:creator>
      <dc:date>2024-03-25T23:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: If function won't recognize nil value string variable</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/if-function-won-t-recognize-nil-value-string-variable/m-p/12665020#M15898</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14002716"&gt;@Gorra&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/593837"&gt;@ronjonp&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it can give me that information, I will get VLIDE directly and check. Or is that the one embedded in AutoCad?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Gorra&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The &lt;A href="https://help.autodesk.com/view/ACD/2024/ENU/?guid=GUID-30033BD2-7A43-4109-B08A-C1CFC9A7D9A5" target="_blank" rel="noopener"&gt;VLIDE/VSCODE&lt;/A&gt; is included with the full version of AutoCAD. What are you using to debug now?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 23:14:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/if-function-won-t-recognize-nil-value-string-variable/m-p/12665020#M15898</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2024-03-25T23:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: If function won't recognize nil value string variable</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/if-function-won-t-recognize-nil-value-string-variable/m-p/12665050#M15899</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/593837"&gt;@ronjonp&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I'm making significant changes the the code I use notepad++, with alerts and princs embedded in relevant places. I open the LISP editor in CAD about a quarter of the time. I didn't realize it could track your variable values, I'll have to start using it more.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's looking like the simplified if statements are going to work. Having "if [variable]" and nothing after it returning nil isn't what I thought it would do, but I guess it makes sense.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gorra&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 23:29:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/if-function-won-t-recognize-nil-value-string-variable/m-p/12665050#M15899</guid>
      <dc:creator>Gorra</dc:creator>
      <dc:date>2024-03-25T23:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: If function won't recognize nil value string variable</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/if-function-won-t-recognize-nil-value-string-variable/m-p/12671157#M15900</link>
      <description>&lt;P&gt;If you use say getstring and press Enter you will get "" a string with nothing in it, a getreal press enter will return nil.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if that helps.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 04:34:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/if-function-won-t-recognize-nil-value-string-variable/m-p/12671157#M15900</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-03-28T04:34:36Z</dc:date>
    </item>
  </channel>
</rss>

