TheSwamp

Code Red => .NET => Topic started by: Oak3s on September 02, 2011, 05:20:20 PM

Title: Send a command to the AutoCAD command line
Post by: Oak3s on September 02, 2011, 05:20:20 PM
The following code is copied from AutoCAD .NET Developers Guide.

In the acDoc.SendStringToExecute portion, what is the true, false, false part of the circle command?
Where can I go to read about this besides asking these kinds of questions here.  8-)

Code: [Select]
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.Runtime;
[CommandMethod("SendACommandToAutoCAD")]
public static void SendACommandToAutoCAD()
{
Document acDoc = Application.DocumentManager.MdiActiveDocument;
// Draws a circle and zooms to the extents or
// limits of the drawing
acDoc.SendStringToExecute("._circle 2,2,0 4 ", true, false, false);
acDoc.SendStringToExecute("._zoom _all ", true, false, false);
}
Title: Re: Send a command to the AutoCAD command line
Post by: kdub_nz on September 02, 2011, 05:43:25 PM
ARXDEV.chm and ARXMGD.chm will help ..
Title: Re: Send a command to the AutoCAD command line
Post by: Jeff H on September 02, 2011, 06:03:53 PM
**************EDIT**************************
Sorry Kerry, did not know you posted the same thing
**************EDIT**************************
 
In the ObjectArx 20XX sdk you downloaded there is a folder called docs inside that folder is arxdoc.chm
Which contains the arxmgd.chm and all other .chm's in that folder.
So with that one .chm(arxdoc.chm):
You could type SendStringToExecute in the textbox on the index tab and get this.
(Notice the sendStringToExecute that starts with the lower case s, that is the ARX command which usually has more info)

(http://i1221.photobucket.com/albums/dd473/Jeffrey_H/SendStringToExecutemgd.png)

Or you could type SendStringToExecute on the search tab and find info like this

(http://i1221.photobucket.com/albums/dd473/Jeffrey_H/SendStringToExecuteARX.png)
Title: Re: Send a command to the AutoCAD command line
Post by: Oak3s on September 02, 2011, 06:14:10 PM
Oh man...this is what I have been looking for. Thank you both...

[is there anyone else who posts here - you two are 2 for 2 today for me  :-)]

Sorry Kerry. Thought you were someone else  :-(
Thanks anyway.

Thanks again.

edited by Oak3s 110902
Title: Re: Send a command to the AutoCAD command line
Post by: Jeff H on September 02, 2011, 06:25:33 PM
I probably have been posting too much lately and need to lay back and hopefully not ran anyone off but there are ton of guys who are way smarter and knowledge than me that could give better answers.

I wish Kerry, GlennR, Daniel(_assume) etc... to name a few would post more.

Hopefully Jeff_M, kaefer, gile etc.... keep posting.

I have left many names out that deserve to be in both list.