<?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: acedcommand function in .Net managed classes in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/acedcommand-function-in-net-managed-classes/m-p/1332894#M85022</link>
    <description>There's none. This function isn't exposed via the .NET API. The function &lt;BR /&gt;
that comes closest is Document.SendStringToExecute.&lt;BR /&gt;
&lt;BR /&gt;
Albert&lt;BR /&gt;
&lt;TANGFERRY&gt; wrote in message news:4852689@discussion.autodesk.com...&lt;BR /&gt;
What is the corresponding functions or classes for thesethe arx Global&lt;BR /&gt;
function acedcommand in the .NET managed classes?&lt;/TANGFERRY&gt;</description>
    <pubDate>Sun, 22 May 2005 21:23:53 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-05-22T21:23:53Z</dc:date>
    <item>
      <title>acedcommand function in .Net managed classes</title>
      <link>https://forums.autodesk.com/t5/net-forum/acedcommand-function-in-net-managed-classes/m-p/1332893#M85021</link>
      <description>What is the corresponding functions or classes for thesethe arx Global&lt;BR /&gt;
function acedcommand in the .NET managed classes?</description>
      <pubDate>Sat, 21 May 2005 11:13:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acedcommand-function-in-net-managed-classes/m-p/1332893#M85021</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-21T11:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: acedcommand function in .Net managed classes</title>
      <link>https://forums.autodesk.com/t5/net-forum/acedcommand-function-in-net-managed-classes/m-p/1332894#M85022</link>
      <description>There's none. This function isn't exposed via the .NET API. The function &lt;BR /&gt;
that comes closest is Document.SendStringToExecute.&lt;BR /&gt;
&lt;BR /&gt;
Albert&lt;BR /&gt;
&lt;TANGFERRY&gt; wrote in message news:4852689@discussion.autodesk.com...&lt;BR /&gt;
What is the corresponding functions or classes for thesethe arx Global&lt;BR /&gt;
function acedcommand in the .NET managed classes?&lt;/TANGFERRY&gt;</description>
      <pubDate>Sun, 22 May 2005 21:23:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acedcommand-function-in-net-managed-classes/m-p/1332894#M85022</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-22T21:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: acedcommand function in .Net managed classes</title>
      <link>https://forums.autodesk.com/t5/net-forum/acedcommand-function-in-net-managed-classes/m-p/1332895#M85023</link>
      <description>They didn't expose it.&lt;BR /&gt;
&lt;BR /&gt;
Give the following a go, and see what happens. &lt;BR /&gt;
&lt;BR /&gt;
Note that the same exact rules that govern the use&lt;BR /&gt;
of acedCommand() in native ObjectARX apply here&lt;BR /&gt;
(namely, you can't use it from the Application context).&lt;BR /&gt;
&lt;BR /&gt;
////////////////// CommandSample.cs ///////////////////&lt;BR /&gt;
// Copyright (c)2005  Tony Tanzillo, all rights reserved&lt;BR /&gt;
//&lt;BR /&gt;
// Shows how to execute commands without resorting&lt;BR /&gt;
// to the kludgy SendStringToExecute method. &lt;BR /&gt;
// &lt;BR /&gt;
// The command 'COMMANDTEST' draws a circle &lt;BR /&gt;
// centered at 2,2,0 with a radius of 4.0 units.&lt;BR /&gt;
&lt;BR /&gt;
using System;&lt;BR /&gt;
using Autodesk.AutoCAD.DatabaseServices;&lt;BR /&gt;
using Autodesk.AutoCAD.Geometry;&lt;BR /&gt;
using AcadApp = Autodesk.AutoCAD.ApplicationServices.Application;&lt;BR /&gt;
&lt;BR /&gt;
public class CommandSample&lt;BR /&gt;
{&lt;BR /&gt;
   const Int32 RTREAL    = 5001; &lt;BR /&gt;
   const Int32 RTSTR     = 5005; &lt;BR /&gt;
   const Int32 RT3DPOINT = 5009; &lt;BR /&gt;
&lt;BR /&gt;
   [DllImport("acad.exe", CallingConvention = CallingConvention.Cdecl, &lt;BR /&gt;
      EntryPoint="acedCmd")]&lt;BR /&gt;
   extern static int acedCmd(IntPtr pResbuf);&lt;BR /&gt;
&lt;BR /&gt;
   unsafe static int Command(ResultBuffer args)&lt;BR /&gt;
   {&lt;BR /&gt;
      if( ! AcadApp.DocumentManager.IsApplicationContext )&lt;BR /&gt;
         return acedCmd((IntPtr) args.UnmanagedObject.ToPointer());&lt;BR /&gt;
      else&lt;BR /&gt;
         return 0;&lt;BR /&gt;
   }&lt;BR /&gt;
&lt;BR /&gt;
   [Autodesk.AutoCAD.Runtime.CommandMethod("COMMANDTEST")]&lt;BR /&gt;
   public static void CommandTest()&lt;BR /&gt;
   {&lt;BR /&gt;
      ResultBuffer args = new ResultBuffer();&lt;BR /&gt;
      args.Add(new TypedValue(RTSTR, "._circle"));&lt;BR /&gt;
      args.Add(new TypedValue(RT3DPOINT, new Point3d(2.0, 2.0, 0.0)));&lt;BR /&gt;
      args.Add(new TypedValue(RTREAL, 4.0));&lt;BR /&gt;
      Command(args);&lt;BR /&gt;
   }&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;TANGFERRY&gt; wrote in message news:4852689@discussion.autodesk.com...&lt;BR /&gt;
What is the corresponding functions or classes for thesethe arx Global&lt;BR /&gt;
function acedcommand in the .NET managed classes?&lt;/TANGFERRY&gt;</description>
      <pubDate>Mon, 23 May 2005 08:48:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acedcommand-function-in-net-managed-classes/m-p/1332895#M85023</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-23T08:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: acedcommand function in .Net managed classes</title>
      <link>https://forums.autodesk.com/t5/net-forum/acedcommand-function-in-net-managed-classes/m-p/1332896#M85024</link>
      <description>can you tell me how to use Document.SendStringToExecute functioon?An example is not bad.</description>
      <pubDate>Mon, 23 May 2005 13:29:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acedcommand-function-in-net-managed-classes/m-p/1332896#M85024</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-23T13:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: acedcommand function in .Net managed classes</title>
      <link>https://forums.autodesk.com/t5/net-forum/acedcommand-function-in-net-managed-classes/m-p/1332897#M85025</link>
      <description>I am trying to learn C# based on examples that I find in this discussion&lt;BR /&gt;
group. With that said, based on the example below, I am receiving the error&lt;BR /&gt;
message: The name 'acedCmd' does not exist in the class or namespace&lt;BR /&gt;
'AcadTest01.CommandSample' Can someone help?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message&lt;BR /&gt;
news:4853121@discussion.autodesk.com...&lt;BR /&gt;
They didn't expose it.&lt;BR /&gt;
&lt;BR /&gt;
Give the following a go, and see what happens.&lt;BR /&gt;
&lt;BR /&gt;
Note that the same exact rules that govern the use&lt;BR /&gt;
of acedCommand() in native ObjectARX apply here&lt;BR /&gt;
(namely, you can't use it from the Application context).&lt;BR /&gt;
&lt;BR /&gt;
////////////////// CommandSample.cs ///////////////////&lt;BR /&gt;
// Copyright (c)2005  Tony Tanzillo, all rights reserved&lt;BR /&gt;
//&lt;BR /&gt;
// Shows how to execute commands without resorting&lt;BR /&gt;
// to the kludgy SendStringToExecute method.&lt;BR /&gt;
//&lt;BR /&gt;
// The command 'COMMANDTEST' draws a circle&lt;BR /&gt;
// centered at 2,2,0 with a radius of 4.0 units.&lt;BR /&gt;
&lt;BR /&gt;
using System;&lt;BR /&gt;
using Autodesk.AutoCAD.DatabaseServices;&lt;BR /&gt;
using Autodesk.AutoCAD.Geometry;&lt;BR /&gt;
using AcadApp = Autodesk.AutoCAD.ApplicationServices.Application;&lt;BR /&gt;
&lt;BR /&gt;
public class CommandSample&lt;BR /&gt;
{&lt;BR /&gt;
   const Int32 RTREAL    = 5001;&lt;BR /&gt;
   const Int32 RTSTR     = 5005;&lt;BR /&gt;
   const Int32 RT3DPOINT = 5009;&lt;BR /&gt;
&lt;BR /&gt;
   [DllImport("acad.exe", CallingConvention = CallingConvention.Cdecl,&lt;BR /&gt;
      EntryPoint="acedCmd")]&lt;BR /&gt;
   extern static int acedCmd(IntPtr pResbuf);&lt;BR /&gt;
&lt;BR /&gt;
   unsafe static int Command(ResultBuffer args)&lt;BR /&gt;
   {&lt;BR /&gt;
      if( ! AcadApp.DocumentManager.IsApplicationContext )&lt;BR /&gt;
         return acedCmd((IntPtr) args.UnmanagedObject.ToPointer());&lt;BR /&gt;
      else&lt;BR /&gt;
         return 0;&lt;BR /&gt;
   }&lt;BR /&gt;
&lt;BR /&gt;
   [Autodesk.AutoCAD.Runtime.CommandMethod("COMMANDTEST")]&lt;BR /&gt;
   public static void CommandTest()&lt;BR /&gt;
   {&lt;BR /&gt;
      ResultBuffer args = new ResultBuffer();&lt;BR /&gt;
      args.Add(new TypedValue(RTSTR, "._circle"));&lt;BR /&gt;
      args.Add(new TypedValue(RT3DPOINT, new Point3d(2.0, 2.0, 0.0)));&lt;BR /&gt;
      args.Add(new TypedValue(RTREAL, 4.0));&lt;BR /&gt;
      Command(args);&lt;BR /&gt;
   }&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;TANGFERRY&gt; wrote in message news:4852689@discussion.autodesk.com...&lt;BR /&gt;
What is the corresponding functions or classes for thesethe arx Global&lt;BR /&gt;
function acedcommand in the .NET managed classes?&lt;/TANGFERRY&gt;&lt;/TONY.TANZILLO&gt;</description>
      <pubDate>Fri, 27 May 2005 15:37:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acedcommand-function-in-net-managed-classes/m-p/1332897#M85025</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-27T15:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: acedcommand function in .Net managed classes</title>
      <link>https://forums.autodesk.com/t5/net-forum/acedcommand-function-in-net-managed-classes/m-p/1332898#M85026</link>
      <description>Something like this: &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.SendStringToExecute("_Zoom _E ", False, True, False)</description>
      <pubDate>Fri, 27 May 2005 15:54:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acedcommand-function-in-net-managed-classes/m-p/1332898#M85026</guid>
      <dc:creator>Mikko</dc:creator>
      <dc:date>2005-05-27T15:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: acedcommand function in .Net managed classes</title>
      <link>https://forums.autodesk.com/t5/net-forum/acedcommand-function-in-net-managed-classes/m-p/1332899#M85027</link>
      <description>You'll probably have more success "trying to learn C#" at places like &lt;BR /&gt;
http://msdn.microsoft.com/vcsharp/gettingstarted/default.aspx; this &lt;BR /&gt;
discussion group more-or-less assumes knowledge of a .NET language.&lt;BR /&gt;
&lt;BR /&gt;
   Dan&lt;BR /&gt;
&lt;BR /&gt;
"Edward Merkins" &lt;ED&gt; wrote in message &lt;BR /&gt;
news:4858845@discussion.autodesk.com...&lt;BR /&gt;
I am trying to learn C# based on examples that I find in this discussion&lt;BR /&gt;
group. With that said, based on the example below, I am receiving the error&lt;BR /&gt;
message: The name 'acedCmd' does not exist in the class or namespace&lt;BR /&gt;
'AcadTest01.CommandSample' Can someone help?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message&lt;BR /&gt;
news:4853121@discussion.autodesk.com...&lt;BR /&gt;
They didn't expose it.&lt;BR /&gt;
&lt;BR /&gt;
Give the following a go, and see what happens.&lt;BR /&gt;
&lt;BR /&gt;
Note that the same exact rules that govern the use&lt;BR /&gt;
of acedCommand() in native ObjectARX apply here&lt;BR /&gt;
(namely, you can't use it from the Application context).&lt;BR /&gt;
&lt;BR /&gt;
////////////////// CommandSample.cs ///////////////////&lt;BR /&gt;
// Copyright (c)2005  Tony Tanzillo, all rights reserved&lt;BR /&gt;
//&lt;BR /&gt;
// Shows how to execute commands without resorting&lt;BR /&gt;
// to the kludgy SendStringToExecute method.&lt;BR /&gt;
//&lt;BR /&gt;
// The command 'COMMANDTEST' draws a circle&lt;BR /&gt;
// centered at 2,2,0 with a radius of 4.0 units.&lt;BR /&gt;
&lt;BR /&gt;
using System;&lt;BR /&gt;
using Autodesk.AutoCAD.DatabaseServices;&lt;BR /&gt;
using Autodesk.AutoCAD.Geometry;&lt;BR /&gt;
using AcadApp = Autodesk.AutoCAD.ApplicationServices.Application;&lt;BR /&gt;
&lt;BR /&gt;
public class CommandSample&lt;BR /&gt;
{&lt;BR /&gt;
   const Int32 RTREAL    = 5001;&lt;BR /&gt;
   const Int32 RTSTR     = 5005;&lt;BR /&gt;
   const Int32 RT3DPOINT = 5009;&lt;BR /&gt;
&lt;BR /&gt;
   [DllImport("acad.exe", CallingConvention = CallingConvention.Cdecl,&lt;BR /&gt;
      EntryPoint="acedCmd")]&lt;BR /&gt;
   extern static int acedCmd(IntPtr pResbuf);&lt;BR /&gt;
&lt;BR /&gt;
   unsafe static int Command(ResultBuffer args)&lt;BR /&gt;
   {&lt;BR /&gt;
      if( ! AcadApp.DocumentManager.IsApplicationContext )&lt;BR /&gt;
         return acedCmd((IntPtr) args.UnmanagedObject.ToPointer());&lt;BR /&gt;
      else&lt;BR /&gt;
         return 0;&lt;BR /&gt;
   }&lt;BR /&gt;
&lt;BR /&gt;
   [Autodesk.AutoCAD.Runtime.CommandMethod("COMMANDTEST")]&lt;BR /&gt;
   public static void CommandTest()&lt;BR /&gt;
   {&lt;BR /&gt;
      ResultBuffer args = new ResultBuffer();&lt;BR /&gt;
      args.Add(new TypedValue(RTSTR, "._circle"));&lt;BR /&gt;
      args.Add(new TypedValue(RT3DPOINT, new Point3d(2.0, 2.0, 0.0)));&lt;BR /&gt;
      args.Add(new TypedValue(RTREAL, 4.0));&lt;BR /&gt;
      Command(args);&lt;BR /&gt;
   }&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;TANGFERRY&gt; wrote in message news:4852689@discussion.autodesk.com...&lt;BR /&gt;
What is the corresponding functions or classes for thesethe arx Global&lt;BR /&gt;
function acedcommand in the .NET managed classes?&lt;/TANGFERRY&gt;&lt;/TONY.TANZILLO&gt;&lt;/ED&gt;</description>
      <pubDate>Fri, 27 May 2005 16:22:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acedcommand-function-in-net-managed-classes/m-p/1332899#M85027</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-27T16:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: acedcommand function in .Net managed classes</title>
      <link>https://forums.autodesk.com/t5/net-forum/acedcommand-function-in-net-managed-classes/m-p/1332900#M85028</link>
      <description>Never mind - I had a typo.&lt;BR /&gt;
&lt;BR /&gt;
"Edward Merkins" &lt;ED&gt; wrote in message&lt;BR /&gt;
news:4858845@discussion.autodesk.com...&lt;BR /&gt;
I am trying to learn C# based on examples that I find in this discussion&lt;BR /&gt;
group. With that said, based on the example below, I am receiving the error&lt;BR /&gt;
message: The name 'acedCmd' does not exist in the class or namespace&lt;BR /&gt;
'AcadTest01.CommandSample' Can someone help?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message&lt;BR /&gt;
news:4853121@discussion.autodesk.com...&lt;BR /&gt;
They didn't expose it.&lt;BR /&gt;
&lt;BR /&gt;
Give the following a go, and see what happens.&lt;BR /&gt;
&lt;BR /&gt;
Note that the same exact rules that govern the use&lt;BR /&gt;
of acedCommand() in native ObjectARX apply here&lt;BR /&gt;
(namely, you can't use it from the Application context).&lt;BR /&gt;
&lt;BR /&gt;
////////////////// CommandSample.cs ///////////////////&lt;BR /&gt;
// Copyright (c)2005  Tony Tanzillo, all rights reserved&lt;BR /&gt;
//&lt;BR /&gt;
// Shows how to execute commands without resorting&lt;BR /&gt;
// to the kludgy SendStringToExecute method.&lt;BR /&gt;
//&lt;BR /&gt;
// The command 'COMMANDTEST' draws a circle&lt;BR /&gt;
// centered at 2,2,0 with a radius of 4.0 units.&lt;BR /&gt;
&lt;BR /&gt;
using System;&lt;BR /&gt;
using Autodesk.AutoCAD.DatabaseServices;&lt;BR /&gt;
using Autodesk.AutoCAD.Geometry;&lt;BR /&gt;
using AcadApp = Autodesk.AutoCAD.ApplicationServices.Application;&lt;BR /&gt;
&lt;BR /&gt;
public class CommandSample&lt;BR /&gt;
{&lt;BR /&gt;
   const Int32 RTREAL    = 5001;&lt;BR /&gt;
   const Int32 RTSTR     = 5005;&lt;BR /&gt;
   const Int32 RT3DPOINT = 5009;&lt;BR /&gt;
&lt;BR /&gt;
   [DllImport("acad.exe", CallingConvention = CallingConvention.Cdecl,&lt;BR /&gt;
      EntryPoint="acedCmd")]&lt;BR /&gt;
   extern static int acedCmd(IntPtr pResbuf);&lt;BR /&gt;
&lt;BR /&gt;
   unsafe static int Command(ResultBuffer args)&lt;BR /&gt;
   {&lt;BR /&gt;
      if( ! AcadApp.DocumentManager.IsApplicationContext )&lt;BR /&gt;
         return acedCmd((IntPtr) args.UnmanagedObject.ToPointer());&lt;BR /&gt;
      else&lt;BR /&gt;
         return 0;&lt;BR /&gt;
   }&lt;BR /&gt;
&lt;BR /&gt;
   [Autodesk.AutoCAD.Runtime.CommandMethod("COMMANDTEST")]&lt;BR /&gt;
   public static void CommandTest()&lt;BR /&gt;
   {&lt;BR /&gt;
      ResultBuffer args = new ResultBuffer();&lt;BR /&gt;
      args.Add(new TypedValue(RTSTR, "._circle"));&lt;BR /&gt;
      args.Add(new TypedValue(RT3DPOINT, new Point3d(2.0, 2.0, 0.0)));&lt;BR /&gt;
      args.Add(new TypedValue(RTREAL, 4.0));&lt;BR /&gt;
      Command(args);&lt;BR /&gt;
   }&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;TANGFERRY&gt; wrote in message news:4852689@discussion.autodesk.com...&lt;BR /&gt;
What is the corresponding functions or classes for thesethe arx Global&lt;BR /&gt;
function acedcommand in the .NET managed classes?&lt;/TANGFERRY&gt;&lt;/TONY.TANZILLO&gt;&lt;/ED&gt;</description>
      <pubDate>Fri, 27 May 2005 16:37:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acedcommand-function-in-net-managed-classes/m-p/1332900#M85028</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-27T16:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: acedcommand function in .Net managed classes</title>
      <link>https://forums.autodesk.com/t5/net-forum/acedcommand-function-in-net-managed-classes/m-p/1332901#M85029</link>
      <description>So I take it you didn't no the answer. Don't post responses if you don't&lt;BR /&gt;
have anything intelligent to say! I am already somewhat familiar with C#.&lt;BR /&gt;
Just like the majority of people in this discussion group, I am trying to&lt;BR /&gt;
get a better understanding of using C# with AutoCAD.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"J. Daniel Smith" &lt;J_DANIEL_SMITH&gt; wrote in message&lt;BR /&gt;
news:4858917@discussion.autodesk.com...&lt;BR /&gt;
You'll probably have more success "trying to learn C#" at places like&lt;BR /&gt;
http://msdn.microsoft.com/vcsharp/gettingstarted/default.aspx; this&lt;BR /&gt;
discussion group more-or-less assumes knowledge of a .NET language.&lt;BR /&gt;
&lt;BR /&gt;
   Dan&lt;BR /&gt;
&lt;BR /&gt;
"Edward Merkins" &lt;ED&gt; wrote in message&lt;BR /&gt;
news:4858845@discussion.autodesk.com...&lt;BR /&gt;
I am trying to learn C# based on examples that I find in this discussion&lt;BR /&gt;
group. With that said, based on the example below, I am receiving the error&lt;BR /&gt;
message: The name 'acedCmd' does not exist in the class or namespace&lt;BR /&gt;
'AcadTest01.CommandSample' Can someone help?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message&lt;BR /&gt;
news:4853121@discussion.autodesk.com...&lt;BR /&gt;
They didn't expose it.&lt;BR /&gt;
&lt;BR /&gt;
Give the following a go, and see what happens.&lt;BR /&gt;
&lt;BR /&gt;
Note that the same exact rules that govern the use&lt;BR /&gt;
of acedCommand() in native ObjectARX apply here&lt;BR /&gt;
(namely, you can't use it from the Application context).&lt;BR /&gt;
&lt;BR /&gt;
////////////////// CommandSample.cs ///////////////////&lt;BR /&gt;
// Copyright (c)2005  Tony Tanzillo, all rights reserved&lt;BR /&gt;
//&lt;BR /&gt;
// Shows how to execute commands without resorting&lt;BR /&gt;
// to the kludgy SendStringToExecute method.&lt;BR /&gt;
//&lt;BR /&gt;
// The command 'COMMANDTEST' draws a circle&lt;BR /&gt;
// centered at 2,2,0 with a radius of 4.0 units.&lt;BR /&gt;
&lt;BR /&gt;
using System;&lt;BR /&gt;
using Autodesk.AutoCAD.DatabaseServices;&lt;BR /&gt;
using Autodesk.AutoCAD.Geometry;&lt;BR /&gt;
using AcadApp = Autodesk.AutoCAD.ApplicationServices.Application;&lt;BR /&gt;
&lt;BR /&gt;
public class CommandSample&lt;BR /&gt;
{&lt;BR /&gt;
   const Int32 RTREAL    = 5001;&lt;BR /&gt;
   const Int32 RTSTR     = 5005;&lt;BR /&gt;
   const Int32 RT3DPOINT = 5009;&lt;BR /&gt;
&lt;BR /&gt;
   [DllImport("acad.exe", CallingConvention = CallingConvention.Cdecl,&lt;BR /&gt;
      EntryPoint="acedCmd")]&lt;BR /&gt;
   extern static int acedCmd(IntPtr pResbuf);&lt;BR /&gt;
&lt;BR /&gt;
   unsafe static int Command(ResultBuffer args)&lt;BR /&gt;
   {&lt;BR /&gt;
      if( ! AcadApp.DocumentManager.IsApplicationContext )&lt;BR /&gt;
         return acedCmd((IntPtr) args.UnmanagedObject.ToPointer());&lt;BR /&gt;
      else&lt;BR /&gt;
         return 0;&lt;BR /&gt;
   }&lt;BR /&gt;
&lt;BR /&gt;
   [Autodesk.AutoCAD.Runtime.CommandMethod("COMMANDTEST")]&lt;BR /&gt;
   public static void CommandTest()&lt;BR /&gt;
   {&lt;BR /&gt;
      ResultBuffer args = new ResultBuffer();&lt;BR /&gt;
      args.Add(new TypedValue(RTSTR, "._circle"));&lt;BR /&gt;
      args.Add(new TypedValue(RT3DPOINT, new Point3d(2.0, 2.0, 0.0)));&lt;BR /&gt;
      args.Add(new TypedValue(RTREAL, 4.0));&lt;BR /&gt;
      Command(args);&lt;BR /&gt;
   }&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;TANGFERRY&gt; wrote in message news:4852689@discussion.autodesk.com...&lt;BR /&gt;
What is the corresponding functions or classes for thesethe arx Global&lt;BR /&gt;
function acedcommand in the .NET managed classes?&lt;/TANGFERRY&gt;&lt;/TONY.TANZILLO&gt;&lt;/ED&gt;&lt;/J_DANIEL_SMITH&gt;</description>
      <pubDate>Fri, 27 May 2005 16:42:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acedcommand-function-in-net-managed-classes/m-p/1332901#M85029</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-27T16:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: acedcommand function in .Net managed classes</title>
      <link>https://forums.autodesk.com/t5/net-forum/acedcommand-function-in-net-managed-classes/m-p/1332902#M85030</link>
      <description>Can Document.SendStringToExecute() be used (and executed) from within an &lt;BR /&gt;
application?  I'm trying to write a VB.NET batch script processor and what &lt;BR /&gt;
seems to be happening is that the script doesn'tr execute until my app has &lt;BR /&gt;
finished. When I've tested my DLL code on a single DWG file my app runs all &lt;BR /&gt;
the way through, first setting FILEDIA to 0 then back to 1 but the command &lt;BR /&gt;
my app sends as a string doesn't execute until my app has finished, so &lt;BR /&gt;
FILEDIA is set back to 1 and the user has to browse for the script file to &lt;BR /&gt;
run.&lt;BR /&gt;
&lt;BR /&gt;
Is there a reson why SendCommand hasn't been exposed in the .NET API?&lt;BR /&gt;
&lt;BR /&gt;
I've successfully built a version of my app as an exe using COM but I'm &lt;BR /&gt;
trying to get my head into the .NET API. The code I have so far follows:&lt;BR /&gt;
&lt;BR /&gt;
THIS WORKS IN MY EXE&lt;BR /&gt;
&lt;BR /&gt;
Imports Autodesk.AutoCAD.Interop&lt;BR /&gt;
Imports Autodesk.AutoCAD.Interop.Common&lt;BR /&gt;
&lt;BR /&gt;
    Public WithEvents AcadApp As Autodesk.AutoCAD.Interop.AcadApplication&lt;BR /&gt;
    Dim AcadDoc As Autodesk.AutoCAD.Interop.AcadDocument&lt;BR /&gt;
&lt;BR /&gt;
    Sub ProcessDwg(ByVal ThisDwg As String)&lt;BR /&gt;
        'open the file&lt;BR /&gt;
        AcadDoc.Application.Documents.Open(ThisDwg)&lt;BR /&gt;
        AcadDoc = AcadApp.ActiveDocument&lt;BR /&gt;
        'AcadApp.ZoomExtents()&lt;BR /&gt;
&lt;BR /&gt;
        'process the script&lt;BR /&gt;
        AcadDoc.SetVariable("filedia", 0)&lt;BR /&gt;
&lt;BR /&gt;
        AcadDoc.SendCommand("script" &amp;amp; vbCr &amp;amp; """" &amp;amp; Me.txtScriptFile.Text &amp;amp; &lt;BR /&gt;
"""" &amp;amp; vbCr)&lt;BR /&gt;
&lt;BR /&gt;
        AcadDoc.SetVariable("filedia", 1)&lt;BR /&gt;
&lt;BR /&gt;
        'close the file&lt;BR /&gt;
        AcadDoc.Close(Me.chkSaveDWG.Checked, ThisDwg)&lt;BR /&gt;
    End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
THIS DOESN'T WORK IN MY DLL&lt;BR /&gt;
&lt;BR /&gt;
Imports acadApp = Autodesk.AutoCAD.ApplicationServices.Application&lt;BR /&gt;
Imports acadDoc = Autodesk.AutoCAD.ApplicationServices.Document&lt;BR /&gt;
&lt;BR /&gt;
    Dim file As acadDoc&lt;BR /&gt;
&lt;BR /&gt;
    Sub ProcessDwg(ByVal ThisDwg As String)&lt;BR /&gt;
&lt;BR /&gt;
        acadApp.DocumentManager.Open(ThisDwg)&lt;BR /&gt;
        file = acadApp.DocumentManager.MdiActiveDocument&lt;BR /&gt;
        'AcadApp.ZoomExtents()&lt;BR /&gt;
&lt;BR /&gt;
        'process the script&lt;BR /&gt;
        acadApp.SetSystemVariable("filedia", 0)&lt;BR /&gt;
&lt;BR /&gt;
        file.SendStringToExecute("script" &amp;amp; vbCr &amp;amp; """" &amp;amp; Me.txtScript.Text &lt;BR /&gt;
&amp;amp; """" &amp;amp; vbCr, False, False, False)&lt;BR /&gt;
&lt;BR /&gt;
        acadApp.SetSystemVariable("filedia", 1)&lt;BR /&gt;
&lt;BR /&gt;
        'close the file&lt;BR /&gt;
        file.CloseAndSave(ThisDwg)&lt;BR /&gt;
    End Sub</description>
      <pubDate>Thu, 05 Jan 2006 13:48:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/acedcommand-function-in-net-managed-classes/m-p/1332902#M85030</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-01-05T13:48:51Z</dc:date>
    </item>
  </channel>
</rss>

