<?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: SendStringToExecute executed a the end of my command in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/sendstringtoexecute-executed-a-the-end-of-my-command/m-p/1506840#M83132</link>
    <description>thank you very much for your help, is it possible that you attach also your usage of invoke?</description>
    <pubDate>Mon, 19 Dec 2005 14:24:02 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-12-19T14:24:02Z</dc:date>
    <item>
      <title>SendStringToExecute executed a the end of my command</title>
      <link>https://forums.autodesk.com/t5/net-forum/sendstringtoexecute-executed-a-the-end-of-my-command/m-p/1506836#M83128</link>
      <description>I would to like to call a function in Arx C++ that create entities&lt;BR /&gt;
and just after I need to move them. For that, I created a command in .Net that call the Arx function with SendStringToExecute. The problem is, the function called by SendStringToExecute is executed when my command terminates, so I can not move the entities because does not exist yet.&lt;BR /&gt;
&lt;BR /&gt;
Basically here is my code&lt;BR /&gt;
&lt;BR /&gt;
[CommandMethod( "MyCommand")]  _ &lt;BR /&gt;
    Public Shared Function MyCommand()        &lt;BR /&gt;
        acadDocument.SendStringToExecute( "(arx_function ""param1"" ""param2"" ) " )&lt;BR /&gt;
        MoveNewEntities()&lt;BR /&gt;
    End Function&lt;BR /&gt;
&lt;BR /&gt;
How can I call an external function (Arx, Lisp) in a command without to wait the end of the command ?&lt;BR /&gt;
&lt;BR /&gt;
Thank you</description>
      <pubDate>Fri, 09 Dec 2005 19:56:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sendstringtoexecute-executed-a-the-end-of-my-command/m-p/1506836#M83128</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-12-09T19:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: SendStringToExecute executed a the end of my command</title>
      <link>https://forums.autodesk.com/t5/net-forum/sendstringtoexecute-executed-a-the-end-of-my-command/m-p/1506837#M83129</link>
      <description>I found a solution of my problem. I use acedInvoke with a DllImport.</description>
      <pubDate>Mon, 12 Dec 2005 14:54:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sendstringtoexecute-executed-a-the-end-of-my-command/m-p/1506837#M83129</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-12-12T14:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: SendStringToExecute executed a the end of my command</title>
      <link>https://forums.autodesk.com/t5/net-forum/sendstringtoexecute-executed-a-the-end-of-my-command/m-p/1506838#M83130</link>
      <description>will you share with us how did you do that?</description>
      <pubDate>Mon, 19 Dec 2005 13:58:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sendstringtoexecute-executed-a-the-end-of-my-command/m-p/1506838#M83130</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-12-19T13:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: SendStringToExecute executed a the end of my command</title>
      <link>https://forums.autodesk.com/t5/net-forum/sendstringtoexecute-executed-a-the-end-of-my-command/m-p/1506839#M83131</link>
      <description>For sure, you will find an attached file with the c# class "aced" that call the "acedinvoke" method. I hope this will help you.</description>
      <pubDate>Mon, 19 Dec 2005 14:02:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sendstringtoexecute-executed-a-the-end-of-my-command/m-p/1506839#M83131</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-12-19T14:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: SendStringToExecute executed a the end of my command</title>
      <link>https://forums.autodesk.com/t5/net-forum/sendstringtoexecute-executed-a-the-end-of-my-command/m-p/1506840#M83132</link>
      <description>thank you very much for your help, is it possible that you attach also your usage of invoke?</description>
      <pubDate>Mon, 19 Dec 2005 14:24:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sendstringtoexecute-executed-a-the-end-of-my-command/m-p/1506840#M83132</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-12-19T14:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: SendStringToExecute executed a the end of my command</title>
      <link>https://forums.autodesk.com/t5/net-forum/sendstringtoexecute-executed-a-the-end-of-my-command/m-p/1506841#M83133</link>
      <description>I use invoke via vb.net. Here are some samples that call user defined arx function and autocad function. &lt;BR /&gt;
&lt;BR /&gt;
' override with resultbuffer (user defined arx function)&lt;BR /&gt;
Dim result as ResultBuffer&lt;BR /&gt;
Dim args as New ResultBuffer()&lt;BR /&gt;
      args.Add( New TypedValue( Import.aced.valType.RTSTR,   "my_arx_function" ) )&lt;BR /&gt;
      args.Add( New TypedValue( Import.aced.valType.RTSTR,   "a string" ) )&lt;BR /&gt;
      args.Add( New TypedValue( Import.aced.valType.RTSHORT, 0 ) )&lt;BR /&gt;
      Dim ret as Integer = Import.aced.Invoke( args, result )&lt;BR /&gt;
&lt;BR /&gt;
' override with string parameter array (autocad command "units")&lt;BR /&gt;
Dim ret as Integer = Import.aced.Invoke( "command", "_.units", "2", "4", "1", "6", "0", "_N" )&lt;BR /&gt;
&lt;BR /&gt;
Hope this help.</description>
      <pubDate>Mon, 19 Dec 2005 14:30:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sendstringtoexecute-executed-a-the-end-of-my-command/m-p/1506841#M83133</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-12-19T14:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: SendStringToExecute executed a the end of my command</title>
      <link>https://forums.autodesk.com/t5/net-forum/sendstringtoexecute-executed-a-the-end-of-my-command/m-p/1506842#M83134</link>
      <description>thank you very much one more time, but ai have one mor question: why is AcadApp.DocumentManager.IsApplicationContext condition always true and so always return just 0. What mean that is "IsApplicationContext"?&lt;BR /&gt;
&lt;BR /&gt;
thank you for your time, &lt;BR /&gt;
regards Mitja</description>
      <pubDate>Mon, 19 Dec 2005 14:46:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sendstringtoexecute-executed-a-the-end-of-my-command/m-p/1506842#M83134</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-12-19T14:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: SendStringToExecute executed a the end of my command</title>
      <link>https://forums.autodesk.com/t5/net-forum/sendstringtoexecute-executed-a-the-end-of-my-command/m-p/1506843#M83135</link>
      <description>All my invoked functions are in the document context. So I put this test to be sure that I never invoke them out of this context. But you, if you need to invoke functions in the application context you can remove this test.&lt;BR /&gt;
&lt;BR /&gt;
regards,&lt;BR /&gt;
Alex</description>
      <pubDate>Mon, 19 Dec 2005 15:08:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sendstringtoexecute-executed-a-the-end-of-my-command/m-p/1506843#M83135</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-12-19T15:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: SendStringToExecute executed a the end of my command</title>
      <link>https://forums.autodesk.com/t5/net-forum/sendstringtoexecute-executed-a-the-end-of-my-command/m-p/1506844#M83136</link>
      <description>tnx again, but i have one more question, im quite new in this things and i dont know when IsApplicationContext and when is documetn context, what should i do that IsApplicationContext will be false. Because if i delete this condition from your invoke function, still doesn not work. So i think that i have to switch to documetncontext or ... i dont know what .. help pleas &lt;BR /&gt;
&lt;BR /&gt;
regards and thank you very munch again...</description>
      <pubDate>Mon, 19 Dec 2005 15:51:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sendstringtoexecute-executed-a-the-end-of-my-command/m-p/1506844#M83136</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-12-19T15:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: SendStringToExecute executed a the end of my command</title>
      <link>https://forums.autodesk.com/t5/net-forum/sendstringtoexecute-executed-a-the-end-of-my-command/m-p/1506845#M83137</link>
      <description>Me too, I am quite new in AutoCAD development and the only things I can say is :&lt;BR /&gt;
&lt;BR /&gt;
registered command handlers run in the application context when they are registered with "CommandFlags.Session"&lt;BR /&gt;
(see this post http://discussion.autodesk.com/thread.jspa?messageID=4881865 ).&lt;BR /&gt;
&lt;BR /&gt;
My commands ARE NOT registered with the flag "Session" and works well.&lt;BR /&gt;
&lt;BR /&gt;
But now, what kind of error occurs? Is it an exception ? What is the return value of the invoke method? What function are you invoking? &lt;BR /&gt;
&lt;BR /&gt;
I encountered problems when I invoked some AutoCAD functions (for example: ssadd), and I needed to create an arx function to workaround this. I do not know, but it is possible that you can not invoke the function you want. Send me your code I could test it.</description>
      <pubDate>Mon, 19 Dec 2005 16:12:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sendstringtoexecute-executed-a-the-end-of-my-command/m-p/1506845#M83137</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-12-19T16:12:04Z</dc:date>
    </item>
  </channel>
</rss>

