<?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: invoke lisp while command is active... in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/invoke-lisp-while-command-is-active/m-p/5677770#M39722</link>
    <description>&lt;P&gt;Hi Balaji,&lt;/P&gt;&lt;P&gt;That works.&lt;/P&gt;&lt;P&gt;I am completely confused on why, as I thought command-s only helped when you were calling a lisp function that issued commands, from .net.&lt;/P&gt;&lt;P&gt;Having tried it though, it seems like command-s changes the "status" of the command line having focus (in loose terms).&lt;/P&gt;&lt;P&gt;Can you explain why it works, this might help others too.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jun 2015 15:44:57 GMT</pubDate>
    <dc:creator>JamesMaeding</dc:creator>
    <dc:date>2015-06-15T15:44:57Z</dc:date>
    <item>
      <title>invoke lisp while command is active...</title>
      <link>https://forums.autodesk.com/t5/net-forum/invoke-lisp-while-command-is-active/m-p/5667409#M39720</link>
      <description>&lt;P&gt;I have commmands defined in .net, that draw things using lisp functions.&lt;/P&gt;
&lt;P&gt;But I never have called those commands using lisp like (command "mydotnetcmd1" "string1" "value2"...).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It turns out I do have the need to allow users to call like that in scripts and other lisps.&lt;/P&gt;
&lt;P&gt;When I do call them using (command "whatever...), the part of the code that runs a lisp function to draw stuff, does nothing.&lt;/P&gt;
&lt;P&gt;It does not throw an error,&amp;nbsp;I used a try-catch to see. It simply returns a resultbuffer of null.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have to think this is because autocad thinks its still in another lisp function - the (command...), so will not allow a second one to run.&lt;/P&gt;
&lt;P&gt;But that honestly does not make sense to me as that is allowed in every other situation.&lt;/P&gt;
&lt;P&gt;I guess i do not understand why calling using (command... is different, from .net's point of view.&lt;/P&gt;
&lt;P&gt;I tried various commandflags and it did not help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My thought to work around this is make a lispfunction in .net, instead of a commmand, for times when the user wants to run on command line.&lt;/P&gt;
&lt;P&gt;Then .net thinks its already in a lisp function, and that has worked in the past I recall.&lt;/P&gt;
&lt;P&gt;I just do not like not understanding what is going on.&lt;/P&gt;
&lt;P&gt;Any help appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jun 2015 17:21:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/invoke-lisp-while-command-is-active/m-p/5667409#M39720</guid>
      <dc:creator>JamesMaeding</dc:creator>
      <dc:date>2015-06-06T17:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: invoke lisp while command is active...</title>
      <link>https://forums.autodesk.com/t5/net-forum/invoke-lisp-while-command-is-active/m-p/5677218#M39721</link>
      <description>&lt;P&gt;Hi James,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for the delay.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried using (command-s) to invoke the Lispfunctions in your .Net module ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that does not help, can you please&amp;nbsp;let me know what the LispFunction&amp;nbsp;does ?&lt;/P&gt;
&lt;P&gt;It could be specific to what the .Net code is doing and the context in which it gets called when invoked from Lisp.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Balaji&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2015 10:38:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/invoke-lisp-while-command-is-active/m-p/5677218#M39721</guid>
      <dc:creator>Balaji_Ram</dc:creator>
      <dc:date>2015-06-15T10:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: invoke lisp while command is active...</title>
      <link>https://forums.autodesk.com/t5/net-forum/invoke-lisp-while-command-is-active/m-p/5677770#M39722</link>
      <description>&lt;P&gt;Hi Balaji,&lt;/P&gt;&lt;P&gt;That works.&lt;/P&gt;&lt;P&gt;I am completely confused on why, as I thought command-s only helped when you were calling a lisp function that issued commands, from .net.&lt;/P&gt;&lt;P&gt;Having tried it though, it seems like command-s changes the "status" of the command line having focus (in loose terms).&lt;/P&gt;&lt;P&gt;Can you explain why it works, this might help others too.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2015 15:44:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/invoke-lisp-while-command-is-active/m-p/5677770#M39722</guid>
      <dc:creator>JamesMaeding</dc:creator>
      <dc:date>2015-06-15T15:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: invoke lisp while command is active...</title>
      <link>https://forums.autodesk.com/t5/net-forum/invoke-lisp-while-command-is-active/m-p/5678595#M39723</link>
      <description>&lt;P&gt;Hi James,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In a white paper on migrating applications to work inside&amp;nbsp;AutoCAD after fibers had been removed, a senior member of our engineering team, had this to say about (command-s)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;----&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The (command-s) function is a new variation of the (command) function which has some restrictions on command token content, but is both faster than (command) and can be used in *error* handlers where the (command) function cannot be used when running fiberless, due to internal logic differences.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The "-s" suffix stands for "subroutine" execution of the supplied tokens. &amp;nbsp;Although it does effectively the same thing as the (command) function, the internal interaction with AutoCAD is very different.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;----&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The way i see it is that when you have all the tokens that are required by AutoCAD to complete the command in one go,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I would use&amp;nbsp;command-s, regardless of whether (command) works in that case. This is because, as mentioned in the above note&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;the internal implementation and interaction inside AutoCAD is quite different for both of these and (command-s) handles&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;fiberless operations and in such cases&amp;nbsp;the use of&amp;nbsp;(command) would fail.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;Balaji&lt;/SPAN&gt;&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2015 04:54:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/invoke-lisp-while-command-is-active/m-p/5678595#M39723</guid>
      <dc:creator>Balaji_Ram</dc:creator>
      <dc:date>2015-06-16T04:54:24Z</dc:date>
    </item>
  </channel>
</rss>

