.NET

Reply
Contributor
civil3d.net
Posts: 16
Registered: ‎07-05-2006
Message 1 of 3 (354 Views)

sendcommand sample

354 Views, 2 Replies
08-24-2006 10:50 AM
could someone provide a send command sample for vb.net?

Thanks in advance
Valued Contributor
aslam
Posts: 86
Registered: ‎07-22-2006
Message 2 of 3 (354 Views)

Re: sendcommand sample

08-27-2006 08:49 PM in reply to: civil3d.net
Its C# equvalent. May be in VB.Net some minor difference there.

Autodesk.Autocad.ApplicationServices.Application.DocumentManager.MDIActiveDocument.SendStringToExecute("Close ",true,false,false);
Distinguished Contributor
Alexander Rivilis
Posts: 303
Registered: ‎09-26-2004
Message 3 of 3 (354 Views)

Re: sendcommand sample

08-28-2006 03:23 AM in reply to: civil3d.net
Direct equivalent of sendcommand in . NET is AcadDocument.SendCommand. You need add reference to AutoCAD 200X Type Library and AutoCAD/ObjectDBX Common 1X.0 Type Library. X is 6 for AutoCad 2006 and 7 for AutoCAD 2007
Sample:
[code]
Public Sub TestSendCommand(ByVal cmd As String)
Dim app As AcadApplication = Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication
app.ActiveDocument.SendCommand(cmd)
End Sub
[/code]
Remember to add blank or newline symbol to string cmd.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.