Posts: 16
Registered: ‎07-05-2006
Message 1 of 3 (347 Views)

sendcommand sample

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

Thanks in advance
Valued Contributor
Posts: 86
Registered: ‎07-22-2006
Message 2 of 3 (347 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 (347 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
Public Sub TestSendCommand(ByVal cmd As String)
Dim app As AcadApplication = Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication
End Sub
Remember to add blank or newline symbol to string cmd.
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.