<?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: DCL Value not passing to the Lisp Variable in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-value-not-passing-to-the-lisp-variable/m-p/13185860#M5611</link>
    <description>&lt;P&gt;I bet you still have the original fold out of the autocad template for a 12x12 tablet&lt;/P&gt;</description>
    <pubDate>Mon, 02 Dec 2024 02:35:20 GMT</pubDate>
    <dc:creator>paullimapa</dc:creator>
    <dc:date>2024-12-02T02:35:20Z</dc:date>
    <item>
      <title>DCL Value not passing to the Lisp Variable</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-value-not-passing-to-the-lisp-variable/m-p/13184795#M5603</link>
      <description>&lt;P&gt;Hello Everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope skilled people from this group can help some less skilled one like me here..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have started to learn about DCL through online videos. I have created a test DCL and LISP.&amp;nbsp; Lisp will get longer as I succeed in this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So coming to the conversation, my LISP is getting loaded, dialog box pops up and I provide value in the edit box. After hitting OK button the value stored in the DCL is not passing to the variable I set in LISP. To dig deeper I added a princ line and it says &lt;STRONG&gt;No Value&lt;/STRONG&gt;. So can anyone look into this and let me know where I am going wrong or what wrong line I have written because of which value from DCL is not passing to the Lisp variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THANKS IN ADVANCE&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;======LISP Code=====&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun c:test ()&lt;/P&gt;&lt;P&gt;(setq dcl_id (load_dialog "test_inputs.dcl"))&amp;nbsp;&lt;/P&gt;&lt;P&gt;(if (not (new_dialog "test_inputs" dcl_id))&lt;BR /&gt;(progn&lt;BR /&gt;(princ "\nFailed to load dialog.")&lt;BR /&gt;(exit)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(action_tile "ok_button" "(done_dialog 1)")&lt;/P&gt;&lt;P&gt;(action_tile "cancel_button" "(done_dialog 0)")&lt;/P&gt;&lt;P&gt;(setq dialog_result (start_dialog))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(setq NAC_Address (get_tile "Starting_Strobe_Address"))&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(princ (strcat "\nRetrieved Address: '" (if NAC_Address NAC_Address "No value") "'"))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(unload_dialog dcl_id)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;(princ)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;==========DCL Code===========&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;test_inputs : dialog {&lt;/P&gt;&lt;P&gt;&amp;nbsp; label = "Enter Notification Address";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; : edit_box {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; key = "Starting_Strobe_Address";&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; label = "Strobe Address:";&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; ok_cancel;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2024 06:46:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-value-not-passing-to-the-lisp-variable/m-p/13184795#M5603</guid>
      <dc:creator>ChaitanyaHeb</dc:creator>
      <dc:date>2024-12-01T06:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Value not passing to the Lisp Variable</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-value-not-passing-to-the-lisp-variable/m-p/13184862#M5604</link>
      <description>&lt;P&gt;You are almost there.&lt;/P&gt;&lt;P&gt;I see that you place this in your dcl:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ok_cancel;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You need to look up what is the &lt;STRONG&gt;key&lt;/STRONG&gt; the &lt;STRONG&gt;ok&lt;/STRONG&gt; &amp;amp; the &lt;STRONG&gt;cancel&lt;/STRONG&gt; buttons each are.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;These are stored under &lt;STRONG&gt;base.dcl&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To locate this at &lt;STRONG&gt;AutoCAD&lt;/STRONG&gt; command prompt enter:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(findfile"base.dcl")&lt;/LI-CODE&gt;&lt;P&gt;AutoCAD will return the location of the file as under your windows roaming profile for example:&lt;/P&gt;&lt;P&gt;"C:\Users\&lt;EM&gt;your-windows-profile&lt;/EM&gt;\AppData\Roaming\Autodesk\AutoCAD 2025\R25.0\enu\Support\base.dcl"&lt;/P&gt;&lt;P&gt;Open this file in your lisp editor and search for &lt;STRONG&gt;ok_cancel&lt;/STRONG&gt; which shows the following:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;ok_cancel : column {
    : row {
        fixed_width = true;
        alignment = centered;
        ok_button;
        : spacer { width = 2; }
        cancel_button;
    }
}&lt;/LI-CODE&gt;&lt;P&gt;Now search for &lt;STRONG&gt;ok_button :&lt;/STRONG&gt; &amp;amp; then &lt;STRONG&gt;cancel_button :&lt;/STRONG&gt; :&lt;/P&gt;&lt;LI-CODE lang="general"&gt;ok_button : retirement_button {
        label           = "  OK  ";
        key             = "accept";
        is_default      = true;
}

cancel_button : retirement_button {
        label           = "Cancel";
        key             = "cancel";
        is_cancel       = true;
}&lt;/LI-CODE&gt;&lt;P&gt;This shows the &lt;STRONG&gt;ok_button's&lt;/STRONG&gt; key = "&lt;STRONG&gt;accept&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;cancel_button's&lt;/STRONG&gt; key = "&lt;STRONG&gt;cancel&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;So your action callback statements must reference these two keys and not&amp;nbsp;&lt;SPAN&gt;"&lt;STRONG&gt;ok_button&lt;/STRONG&gt;" or&amp;nbsp;"&lt;STRONG&gt;cancel_button&lt;/STRONG&gt;":&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(action_tile "accept" "(done_dialog 1)")

(action_tile "cancel" "(done_dialog 0)")&lt;/LI-CODE&gt;&lt;P&gt;But closing the dialog will not get you the current value entered into your&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;edit_box&lt;/STRONG&gt; key&amp;nbsp;"&lt;STRONG&gt;Starting_Strobe_Address&lt;/STRONG&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So you should move your &lt;STRONG&gt;get_tile&lt;/STRONG&gt; statement inside the callback statement before your&amp;nbsp;&lt;STRONG&gt;done_dialog&lt;/STRONG&gt; like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(action_tile "accept" "(setq NAC_Address (get_tile \"Starting_Strobe_Address\"))(done_dialog 1)")&lt;/LI-CODE&gt;&lt;P&gt;But to check if the &lt;STRONG&gt;OK&lt;/STRONG&gt; button is selected vs the &lt;STRONG&gt;Cancel&lt;/STRONG&gt; button, you should test using the following condition statement after &lt;STRONG&gt;start_dialog&lt;/STRONG&gt; like this:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(setq dialog_result (start_dialog))
(cond 
 ((= dialog_result 1)
  (alert (strcat "\nRetrieved Address: " NAC_Address))
 )
 ((= dialog_result 0)
  (alert "Canceled button selected")
 )
)&lt;/LI-CODE&gt;&lt;P&gt;Now I would place a default entry into your &lt;STRONG&gt;NAC_Address&lt;/STRONG&gt; by using the &lt;STRONG&gt;set_tile&lt;/STRONG&gt; function before the &lt;STRONG&gt;action_tile&lt;/STRONG&gt; functions so a default value can be retrieved when &lt;STRONG&gt;OK&lt;/STRONG&gt; is selected like this:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(set_tile "Starting_Strobe_Address" "This is address")&lt;/LI-CODE&gt;&lt;P&gt;It may help if you read up on my recent article I wrote called "&lt;STRONG&gt;Dialog Fun Facts: Get Ready, Set, Action!!!&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;&lt;A href="https://issuu.com/augi/docs/aw202409hr/25?ff" target="_blank"&gt;AUGIWORLD by AUGI, Inc. - Issuu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2024 08:20:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-value-not-passing-to-the-lisp-variable/m-p/13184862#M5604</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-12-01T08:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Value not passing to the Lisp Variable</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-value-not-passing-to-the-lisp-variable/m-p/13185692#M5605</link>
      <description>&lt;P&gt;Because your wanting to learn you can speed up the process using this, it allows for multiple edit boxes, the limit is around 20. A screen limit. If you change this line it will write a dcl for you so you can learn from it. It will show you the multi edit box code. You can use the program to write dcl code so make complex dcl fast, combination of radio buttons and edit boxes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another is that RLX has written a dcl to lisp so all the code including dcl is in the one lisp file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE the answer returned in the code is a list of string answers so you may need to use (nth x ans) with (atoi or (atof for numbers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(setq fo (open (setq fname (vl-filename-mktemp "" "" ".dcl")) "w"))

(setq fo (open (setq fname "d:\\acadtemp\\test.dcl") "w")) ; change to your directory name.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ps have Multi Radio buttons &amp;amp; Multi Toggles also.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ps Ps have a make DCl from Autocad objects very primitive radio buttons and edit box version.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2024 23:36:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-value-not-passing-to-the-lisp-variable/m-p/13185692#M5605</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-12-01T23:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Value not passing to the Lisp Variable</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-value-not-passing-to-the-lisp-variable/m-p/13185771#M5606</link>
      <description>&lt;P&gt;Paulli,&lt;/P&gt;&lt;P&gt;Hope you don't mind, but I put all your suggestions to use in attached.&lt;/P&gt;&lt;P&gt;Should work fine.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ECCAD&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 01:03:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-value-not-passing-to-the-lisp-variable/m-p/13185771#M5606</guid>
      <dc:creator>ec-cad</dc:creator>
      <dc:date>2024-12-02T01:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Value not passing to the Lisp Variable</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-value-not-passing-to-the-lisp-variable/m-p/13185832#M5607</link>
      <description>&lt;P&gt;I don't mind at all but I had already attached the updated lisp file in my original reply.&lt;/P&gt;&lt;P&gt;You actually don't need to make any changes to the dcl. The reason I went through the process of searching through the &lt;STRONG&gt;base.dcl&lt;/STRONG&gt; was to show to &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6431248"&gt;@ChaitanyaHeb&lt;/a&gt;&amp;nbsp;the process of getting to the root of what the &lt;STRONG&gt;keys&lt;/STRONG&gt; are when the predefined&amp;nbsp;&lt;STRONG&gt;ok_cancel; &lt;/STRONG&gt;cluster is used.&lt;/P&gt;&lt;P&gt;So you really do not need to replace that with these in the dcl:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;  : ok_button : retirement_button {
        label           = "  OK  ";
        key             = "accept";
        is_default      = true;
  }

  : cancel_button : retirement_button {
        label           = "Cancel";
        key             = "cancel";
        is_cancel       = true;
  }&lt;/LI-CODE&gt;&lt;P&gt;But simply leaving as the OP had it like this works:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;  ok_cancel;&lt;/LI-CODE&gt;&lt;P&gt;As for the revised lisp you attached, I would remove the following action callback statements since these &lt;STRONG&gt;keys&lt;/STRONG&gt; referenced do not exist:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(action_tile "ok_button" "(done_dialog 1)")

(action_tile "cancel_button" "(done_dialog 0)")&lt;/LI-CODE&gt;&lt;P&gt;Now I also did add this action callback statement for the cancel &lt;STRONG&gt;key&lt;/STRONG&gt;:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(action_tile "cancel" "(done_dialog 0)")&lt;/LI-CODE&gt;&lt;P&gt;But you are correct that there's no need to include it because by default when the cancel &lt;STRONG&gt;key&lt;/STRONG&gt; is clicked it'll return a &lt;STRONG&gt;0&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 02:01:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-value-not-passing-to-the-lisp-variable/m-p/13185832#M5607</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-12-02T02:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Value not passing to the Lisp Variable</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-value-not-passing-to-the-lisp-variable/m-p/13185849#M5608</link>
      <description>&lt;P&gt;I have a paper copy of R12 Customization manual so very helpful when looking up stuff for dcl. So default buttons.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ok_cancel&lt;/P&gt;&lt;P&gt;ok_cancel_help&lt;/P&gt;&lt;P&gt;ok_cancel_help_info&lt;/P&gt;&lt;P&gt;ok_cancel_help_errtile&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you can make your own exit button page 166 or online help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An important thing to remember is that a lot of the dcl coding needs to be lower case. It seems that is how they wrote its use all those years ago.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 02:32:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-value-not-passing-to-the-lisp-variable/m-p/13185849#M5608</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-12-02T02:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Value not passing to the Lisp Variable</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-value-not-passing-to-the-lisp-variable/m-p/13185850#M5609</link>
      <description>&lt;P&gt;wow those paper copies are invaluable now-a-days...&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 02:31:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-value-not-passing-to-the-lisp-variable/m-p/13185850#M5609</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-12-02T02:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Value not passing to the Lisp Variable</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-value-not-passing-to-the-lisp-variable/m-p/13185857#M5610</link>
      <description>&lt;P&gt;Yes have a full set. Even ADS programming.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 02:33:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-value-not-passing-to-the-lisp-variable/m-p/13185857#M5610</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-12-02T02:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Value not passing to the Lisp Variable</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-value-not-passing-to-the-lisp-variable/m-p/13185860#M5611</link>
      <description>&lt;P&gt;I bet you still have the original fold out of the autocad template for a 12x12 tablet&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 02:35:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dcl-value-not-passing-to-the-lisp-variable/m-p/13185860#M5611</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-12-02T02:35:20Z</dc:date>
    </item>
  </channel>
</rss>

