<?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: cant able to run LISP with DCL in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12567767#M17691</link>
    <description>&lt;P&gt;Once again glad to have helped…cheers!!!&lt;/P&gt;</description>
    <pubDate>Sun, 18 Feb 2024 16:50:05 GMT</pubDate>
    <dc:creator>paullimapa</dc:creator>
    <dc:date>2024-02-18T16:50:05Z</dc:date>
    <item>
      <title>cant able to run LISP with DCL</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12565129#M17679</link>
      <description>&lt;P&gt;Attached is a very simple LSP and DCL file,&lt;/P&gt;&lt;P&gt;Need help running it. the dialogue box pops up , But drops out then click the button&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="smallish_0-1708105973024.gif" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1327067i6EEC9ACD88DF80ED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="smallish_0-1708105973024.gif" alt="smallish_0-1708105973024.gif" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 17:53:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12565129#M17679</guid>
      <dc:creator>smallƑish</dc:creator>
      <dc:date>2024-02-16T17:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: cant able to run LISP with DCL</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12565258#M17680</link>
      <description>&lt;P&gt;What happens when you run this from the AutoCAD command prompt instead of vlide?&lt;/P&gt;&lt;P&gt;Also what do you expect to happen when you click that button?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 18:59:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12565258#M17680</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-02-16T18:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: cant able to run LISP with DCL</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12565307#M17681</link>
      <description>&lt;P&gt;When we click the&amp;nbsp;C10 button (DCL), the C10 lisp command should activate and ask for a center point to draw a circle with 10 rad.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 19:34:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12565307#M17681</guid>
      <dc:creator>smallƑish</dc:creator>
      <dc:date>2024-02-16T19:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: cant able to run LISP with DCL</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12565356#M17682</link>
      <description>&lt;P&gt;Your lisp is missing at least 2 components:&lt;/P&gt;&lt;P&gt;1. action statements - what happens when a button is clicked&lt;/P&gt;&lt;P&gt;I know you included this in your dcl but going back to the graphic screen requires the dialog to be first closed which your action statement in the dcl does not cover. I prefer to do all the action statements in lisp code which gives a lot more flexibility.&amp;nbsp; One way of doing this since your buttons are similar is to code it like this:&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;; include actions statements before start dialog
(foreach tile '("C10""C15""C20")(action_tile tile "(setq clicked $key)(done_dialog)")) ; this sets value in clicked variable &amp;amp; then closes dialog
; start dialog
(start_dialog dialogResult)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. condition statements - test results to run commands after dialog closes&lt;/P&gt;&lt;P&gt;This is where your different function calls should go. So one way of doing this is using these lines:&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;; unload dialog
(unload_dialog dialogResult)
; test to see what if anything was selected:
(cond
 ((= clicked "C10") (c:C10))
 ((= clicked "C15") (c:C15))
 ((= clicked "C20") (c:C20))
 (t(alert"Nothing Selected"))
) ; cond&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 20:22:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12565356#M17682</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-02-16T20:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: cant able to run LISP with DCL</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12565426#M17683</link>
      <description>&lt;P&gt;ok, just found more problems:&lt;/P&gt;&lt;P&gt;Though not required but a good standard of practice:&lt;/P&gt;&lt;P&gt;I renamed your &lt;STRONG&gt;defun&lt;/STRONG&gt; command to &lt;STRONG&gt;treecircle&lt;/STRONG&gt; to match with the &lt;STRONG&gt;filename&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I localized your variable + the one I added:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; defined function as treecircle
(defun c:treecircle 
; localize variables
 (/ clicked dialogResult)
  (setq dialogResult (load_dialog "treecircle.dcl"))&lt;/LI-CODE&gt;&lt;P&gt;After &lt;STRONG&gt;load_dialog&lt;/STRONG&gt; you have to include this line:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; need to include this line
(new_dialog "treecircle" dialogResult)&lt;/LI-CODE&gt;&lt;P&gt;Your &lt;STRONG&gt;start_dialog&lt;/STRONG&gt; code is incorrect:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; start dialog
;  (start_dialog dialogResult)
; this is the proper method 
  (start_dialog)&lt;/LI-CODE&gt;&lt;P&gt;Lastly your dcl includes this but no attributes:&lt;/P&gt;&lt;P&gt;&lt;A href="https://documentation.help/AutoCAD-ALISP-VLISP/WS73099cc142f4875516d84be10ebc87a53f-7abc.htm" target="_blank"&gt;https://documentation.help/AutoCAD-ALISP-VLISP/WS73099cc142f4875516d84be10ebc87a53f-7abc.htm&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;        :spacer {}&lt;/LI-CODE&gt;&lt;P&gt;See attached revised files&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 20:27:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12565426#M17683</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-02-16T20:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: cant able to run LISP with DCL</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12565506#M17684</link>
      <description>&lt;P&gt;now for your next challenge...bring the dialog back after each circle drawing continuously until you click the OK/Cancel button&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 21:08:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12565506#M17684</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-02-16T21:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: cant able to run LISP with DCL</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12565518#M17685</link>
      <description>&lt;P&gt;That's what I was thinking,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also When I try to make it VLX, its not activating by treecircle command!!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 21:15:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12565518#M17685</guid>
      <dc:creator>smallƑish</dc:creator>
      <dc:date>2024-02-16T21:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: cant able to run LISP with DCL</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12565522#M17686</link>
      <description>&lt;P&gt;Unfortunately, I can't help you with VLX since I don't use this feature.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 21:17:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12565522#M17686</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-02-16T21:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: cant able to run LISP with DCL</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12565540#M17687</link>
      <description>&lt;P&gt;What we have to do for it, to come back the dialogue box, till exit.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 21:27:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12565540#M17687</guid>
      <dc:creator>smallƑish</dc:creator>
      <dc:date>2024-02-16T21:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: cant able to run LISP with DCL</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12565590#M17688</link>
      <description>&lt;P&gt;ok, here's the magic...at least one method of doing it.&lt;/P&gt;&lt;P&gt;First I added another variable &lt;STRONG&gt;what-next&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This is the variable that will be checked to see if it loops or not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; defined function as treecircle
(defun c:treecircle 
; localize variables
 (/ clicked dialogResult what-next)
  (setq dialogResult (load_dialog "treecircle.dcl"))
  (if (not dialogResult)
    (exit)
  )
; setup for dialog loop
(setq what-next 1) ; start with higher than 0
(while (&amp;gt; what-next 0) ; loop as long as value is greater than 0
 (new_dialog "treecircle" dialogResult)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Notice the &lt;STRONG&gt;while&lt;/STRONG&gt; loop occurs after the &lt;STRONG&gt;load_dialog&lt;/STRONG&gt; function. So the dialog only needs to be loaded once. It stays in memory until it's unloaded.&lt;/P&gt;&lt;P&gt;After the &lt;STRONG&gt;while&lt;/STRONG&gt; statement then run the &lt;STRONG&gt;new_dialog&lt;/STRONG&gt; function to make the dialog appear on the screen. This is the function that needs to repeat in the loop or else you won't see the dialog again.&lt;/P&gt;&lt;P&gt;Then I added additional action statements to pass the value declared when &lt;STRONG&gt;start_dialog&lt;/STRONG&gt; runs &amp;amp;&amp;nbsp;&lt;STRONG&gt;done_dialog&lt;/STRONG&gt;&amp;nbsp;function closes the dialog (note the matching uppercase on &lt;STRONG&gt;OK&lt;/STRONG&gt; &amp;amp; &lt;STRONG&gt;CANCEL&lt;/STRONG&gt; which is how you've included these &lt;STRONG&gt;keys&lt;/STRONG&gt; in the dcl):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; include actions statements before start dialog
 (foreach tile '("C10""C15""C20")(action_tile tile "(setq clicked $key)(done_dialog 1)")) ; this sets value in clicked variable &amp;amp; then closes dialog
 (action_tile "OK" "(done_dialog 1)")     ; OK button close dialog but continue loop
 (action_tile "CANCEL" "(done_dialog 0)") ; CANCEL button close dialog &amp;amp; end loop
; start dialog
;  (start_dialog dialogResult)
; this is the proper method 
  (setq what-next (start_dialog)) ; save done_dialog return value&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now the &lt;STRONG&gt;condition&lt;/STRONG&gt; statement tests need to be moved up right after &lt;STRONG&gt;start_dialog&lt;/STRONG&gt; function so these can run in the &lt;STRONG&gt;while&lt;/STRONG&gt; loop. After circle functions are completed, since the &lt;STRONG&gt;what-next&lt;/STRONG&gt; value continues to be greater than &lt;STRONG&gt;0&lt;/STRONG&gt; then it'll&amp;nbsp; loop back up top and run &lt;STRONG&gt;new_dialog&lt;/STRONG&gt; again. But if not, like when the &lt;STRONG&gt;CANCEL&lt;/STRONG&gt; button is clicked which sets the &lt;STRONG&gt;what-next&lt;/STRONG&gt; value to &lt;STRONG&gt;0&lt;/STRONG&gt; then the &lt;STRONG&gt;while&lt;/STRONG&gt; loop ends and the&amp;nbsp;&lt;STRONG&gt;unload_dialog&lt;/STRONG&gt; function is called to remove the dcl from memory and close the routine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; check return value 
 (if(&amp;gt; what-next 0)     ; if greater than 0
  (progn
   (cond                 ; test to see what if anything was selected:
    ((= clicked "C10") (princ(strcat"\nDraw Circle " clicked "..."))(c:C10))
    ((= clicked "C15") (princ(strcat"\nDraw Circle " clicked "..."))(c:C15))
    ((= clicked "C20") (princ(strcat"\nDraw Circle " clicked "..."))(c:C20))
    (t(alert"Nothing Selected"))
   ) ; cond
  ) ; progn
  ; else is 0 
  (alert"Function Cancelled")
 ) ; if
) ; while
; unload dialog
 (unload_dialog dialogResult)
 (princ)
) ; defun&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 22:08:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12565590#M17688</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-02-16T22:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: cant able to run LISP with DCL</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12567166#M17689</link>
      <description>&lt;P&gt;I dont understand why you even need a dcl if your just choosing a circle diameter your defuns work as is. If you dont want the code to be loaded till you actually need it then use the "AUTOLOAD" function in a startup lisp.&amp;nbsp;&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;(autoload "TREESDIA" '("10"))
(autoload "TREESDIA" '("12"))
(autoload "TREESDIA" '("15"))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just a comment we used CIV3D so trees would come in as blocks but the cogo point description had trunk &amp;amp; Diameter so we would read that description and reset the dynamic block with correct spread and a trunk as a circle.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just look at my Multi radio butons.lsp it will do what you want and Ok or pick button closes, so could add a while to pick blocks once dia is found.&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;(if (not AH:Butts)(load "Multi Radio buttons.lsp"))
(if (= ahdef nil)(setq ahdef 1))
(setq ans (atoi (ah:butts ahdef "V" '("Choose a dia " "1" "2" "3" "4" "5" "6" "7" "8" "9" "10")))) ; ans holds the button picked as an integer value&lt;/LI-CODE&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="SeaHaven_0-1708225351836.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1327453i23E19653FE87543D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SeaHaven_0-1708225351836.png" alt="SeaHaven_0-1708225351836.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you do (setq ahdef but) will remember last button selected.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Feb 2024 03:03:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12567166#M17689</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-02-18T03:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: cant able to run LISP with DCL</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12567761#M17690</link>
      <description>&lt;P&gt;This message changed my view about DCL.&amp;nbsp;I believe with just referring your explanation and example codes, everyone can make their own dialogue and execute it with lisp properly. I feel proud to be part of it.&amp;nbsp;Thank you so much from bottom of my heart.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Feb 2024 16:47:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12567761#M17690</guid>
      <dc:creator>smallƑish</dc:creator>
      <dc:date>2024-02-18T16:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: cant able to run LISP with DCL</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12567767#M17691</link>
      <description>&lt;P&gt;Once again glad to have helped…cheers!!!&lt;/P&gt;</description>
      <pubDate>Sun, 18 Feb 2024 16:50:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/cant-able-to-run-lisp-with-dcl/m-p/12567767#M17691</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-02-18T16:50:05Z</dc:date>
    </item>
  </channel>
</rss>

