Simple Visual Basic.net Application using acmgd.dll & acdbmgd.dll

Simple Visual Basic.net Application using acmgd.dll & acdbmgd.dll

isocam
Collaborator Collaborator
936 Views
5 Replies
Message 1 of 6

Simple Visual Basic.net Application using acmgd.dll & acdbmgd.dll

isocam
Collaborator
Collaborator
I need a simple Visual Basic.net Application using acmgd.dll & acdbmgd.dll files that can send a simple text string to the autocad command line.

I am using AutoCAD 2009 but I need to also do the same for AutoCAD LT 2009.

Can anybody tell me if it is possible?

Just for testing!!!

If I can send "hello" that would be a start point for me to modify the code.

Regards

IsoCAM
0 Likes
937 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable

    <CommandMethod("Hello")>
_
    Public Shared Sub
Hello()
        Dim ed As Editor =
Application.DocumentManager.MdiActiveDocument.Editor
       
ed.WriteMessage("Hello, AutoCAD!")
    End Sub

 

Joe ...


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I
need a simple Visual Basic.net Application using acmgd.dll & acdbmgd.dll
files that can send a simple text string to the autocad command line. I am
using AutoCAD 2009 but I need to also do the same for AutoCAD LT 2009. Can
anybody tell me if it is possible? Just for testing!!! If I can send "hello"
that would be a start point for me to modify the code. Regards
IsoCAM
0 Likes
Message 3 of 6

isocam
Collaborator
Collaborator
Hi Joe,

Many thanks for your reply!!!

Can you please do me a favour?

Can you please take a quick look at the following code to see what I am doing wrong.


----------------------------------------------------------------------
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.Runtime



Public Class Form1
Public Shared Sub Hello()
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor()

ed.WriteMessage("Hello, AutoCAD!")
End Sub
End Class
----------------------------------------------------------------------

I am trying (as a test) to send text to autocad lt 2009 command line.

Many thanks

IsoCAM
0 Likes
Message 4 of 6

Anonymous
Not applicable
You can't use .NET programs in AutoCAD LT.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


wrote in message news:6148487@discussion.autodesk.com...
I need a simple Visual Basic.net Application using acmgd.dll & acdbmgd.dll
files that can send a simple text string to the autocad command line. I am
using AutoCAD 2009 but I need to also do the same for AutoCAD LT 2009. Can
anybody tell me if it is possible? Just for testing!!! If I can send "hello"
that would be a start point for me to modify the code. Regards IsoCAM
0 Likes
Message 5 of 6

Anonymous
Not applicable

Just in case by "
size=3>Visual Basic.net Application
" you mean a stand-alone win form app:
you cannot use acmgd.dll and acdbmgd.dll in that type of
application.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I
need a simple Visual Basic.net Application using acmgd.dll & acdbmgd.dll
files that can send a simple text string to the autocad command line. I am
using AutoCAD 2009 but I need to also do the same for AutoCAD LT 2009. Can
anybody tell me if it is possible? Just for testing!!! If I can send "hello"
that would be a start point for me to modify the code. Regards
IsoCAM
0 Likes
Message 6 of 6

Anonymous
Not applicable

AutoCAD LT cannot be automated in this
manner.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Hi
Joe, Many thanks for your reply!!! Can you please do me a favour? Can you
please take a quick look at the following code to see what I am doing wrong.
---------------------------------------------------------------------- Imports
Autodesk.AutoCAD.ApplicationServices Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.EditorInput Imports Autodesk.AutoCAD.Runtime
Public Class Form1 Public Shared Sub Hello() Dim ed As
Editor = Application.DocumentManager.MdiActiveDocument.Editor()
ed.WriteMessage("Hello, AutoCAD!") End Sub End Class
---------------------------------------------------------------------- I am
trying (as a test) to send text to autocad lt 2009 command line. Many thanks
IsoCAM
0 Likes