.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

sendcommand sample

2 REPLIES 2
Reply
Message 1 of 3
civil3d.net
698 Views, 2 Replies

sendcommand sample

could someone provide a send command sample for vb.net?

Thanks in advance
2 REPLIES 2
Message 2 of 3
aslam
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);
Message 3 of 3
Anonymous
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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost