<?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: Error message in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11411622#M11743</link>
    <description>&lt;P&gt;How about creating a .NET lisp function that checks for the existence of the defined lisp command and returns a boolean?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Sep 2022 15:41:05 GMT</pubDate>
    <dc:creator>hippe013</dc:creator>
    <dc:date>2022-09-09T15:41:05Z</dc:date>
    <item>
      <title>Error message</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11405904#M11728</link>
      <description>&lt;P&gt;Hello everyone&lt;/P&gt;&lt;P&gt;How can I get the error message when the command does not work in the below line of code?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt; private void btnYap_Click(object sender, EventArgs e)
        {
            this.Hide();
            Adoc.SendStringToExecute("elev1_symbol\n", true, false, true);
            this.Close();
        }&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 07 Sep 2022 12:21:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11405904#M11728</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2022-09-07T12:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error message</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11406075#M11729</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See &lt;A href="https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/exceptions/exception-handling" target="_blank" rel="noopener"&gt;this topic&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 13:17:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11406075#M11729</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2022-09-07T13:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error message</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11406090#M11730</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I added the try-catch structure before posting on the forum. I also put a message box.&lt;BR /&gt;It didn't show the message when I tested it.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 13:21:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11406090#M11730</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2022-09-07T13:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: Error message</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11409478#M11731</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;elev1_symbol&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is a lisp command. It works from within the lisp routine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know if it makes a difference... in this case, how should the example try catch structure be?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 18:00:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11409478#M11731</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2022-09-08T18:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Error message</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11409679#M11732</link>
      <description>&lt;P&gt;Is there any error message in the AutoCAD command line/text screen?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 19:54:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11409679#M11732</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2022-09-08T19:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: Error message</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11409687#M11733</link>
      <description>&lt;LI-CODE lang="general"&gt;(defun myLispFoo ()
  (princ "\nHello World")
  (princ)
  )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;aDoc.SendStringToExecute("(myLispFoo) ", True, False, True)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Notice the parentheses before and after function name and then a space after that.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 19:57:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11409687#M11733</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2022-09-08T19:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Error message</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11410405#M11734</link>
      <description>&lt;P&gt;command line message: Unknown command "elev1_symbol". Press F1 for help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The classic answer of autocad. In fact, it is clear from this message. but I will specify the lisp name with the&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;messagebox...&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 05:51:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11410405#M11734</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2022-09-09T05:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error message</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11410421#M11735</link>
      <description>&lt;P&gt;i did it this way. but I didn't get the message.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt; private void btnOfsetAt_Click(object sender, EventArgs e)
        {
            this.Hide();
            try
            {
                Adoc.SendStringToExecute("(elev1_symbol) ", true, false, true);
            }
            catch (Exception)
            {

                //throw;
                MessageBox.Show("abcdef lispi yüklü değil.");
            }
            
            this.Close();
        }&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 09 Sep 2022 06:00:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11410421#M11735</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2022-09-09T06:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Error message</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11411312#M11736</link>
      <description>&lt;P&gt;Were you expecting an error?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 13:58:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11411312#M11736</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2022-09-09T13:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Error message</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11411339#M11737</link>
      <description>&lt;P&gt;Yes. As I mentioned in my question.&lt;/P&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;&lt;P&gt;so the &lt;STRONG&gt;elev1_symbol&lt;/STRONG&gt; command is &lt;STRONG&gt;not available...&lt;/STRONG&gt; so I should get an error.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 14:03:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11411339#M11737</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2022-09-09T14:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Error message</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11411341#M11738</link>
      <description>&lt;LI-CODE lang="general"&gt;(defun c:myLispCmd ()
  (princ "\nHello Command!")
  (princ)
  )&lt;/LI-CODE&gt;&lt;LI-CODE lang="general"&gt;aDoc.SendStringToExecute("(c:myLispCmd) ", True, False, True)&lt;/LI-CODE&gt;&lt;LI-CODE lang="general"&gt;(defun myLispFoo ()
  (princ "\nHello Function!")
  (princ)
  )&lt;/LI-CODE&gt;&lt;LI-CODE lang="general"&gt;aDoc.SendStringToExecute("(myLispFoo) ", True, False, True)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 14:04:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11411341#M11738</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2022-09-09T14:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error message</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11411347#M11739</link>
      <description>&lt;P&gt;An error in the execution of the lisp will not bubble up to be an error in the execution of the .NET portion of your code. The try catch will catch errors in your SendStringToExecute and not an error within the lisp itself. That is my understanding anyways.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 14:07:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11411347#M11739</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2022-09-09T14:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Error message</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11411430#M11740</link>
      <description>&lt;P&gt;I understand.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cannot use the try catch construct for this situation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 14:39:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11411430#M11740</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2022-09-09T14:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: Error message</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11411454#M11741</link>
      <description>&lt;P&gt;If you are trying to catch the error within your lisp, use the *error* definition to catch the error. I was showing how send the lisp using the SendStringToExcecute method. What did you want the Try-Catch to catch?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 14:46:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11411454#M11741</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2022-09-09T14:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error message</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11411582#M11742</link>
      <description>&lt;P&gt;now on this i'm not talking about coding an error message in lisp.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;only lisp relation should be in button click event. which, if lisp already exists, the command works. If not, it gives an&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;error on the command line. not found etc...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wanted to receive the not found message with the message box.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 15:25:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11411582#M11742</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2022-09-09T15:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error message</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11411622#M11743</link>
      <description>&lt;P&gt;How about creating a .NET lisp function that checks for the existence of the defined lisp command and returns a boolean?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 15:41:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11411622#M11743</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2022-09-09T15:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: Error message</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11411690#M11744</link>
      <description>&lt;P&gt;If you are using SendStringToExecute(), regardless of the code being executed is LISP command or .NET command, there is no use to wrap it with try...catch..., because the SendStringToExecute() is async and only runs AFTER the calling routine ends (in your case, the execution runs through the try...catch... and the button click routine is done, then the action called in SendStringToExecute() starts). So even there is error because of the SendStringToExecute(), the error cannot be send back to the calling routine, because it HAS ALREADY ENDED.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 16:09:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11411690#M11744</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2022-09-09T16:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: Error message</title>
      <link>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11411812#M11745</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for the detailed explanation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm closing the issue.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 17:08:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/error-message/m-p/11411812#M11745</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2022-09-09T17:08:12Z</dc:date>
    </item>
  </channel>
</rss>

