Connecting VB and AUTOCAD

Connecting VB and AUTOCAD

Anonymous
Not applicable
220 Views
2 Replies
Message 1 of 3

Connecting VB and AUTOCAD

Anonymous
Not applicable
HI

I want to connect AUTOCAD with VB or JAVA. Can anyone help me in this.

I would appreciate it if any one tell me how to do it.

--
KARTHIKEYAN UMAPATHY
Room No. 215, Leonhard Building
Dept. of Industrial Engineering
Penn. State University
University Park
PA - 16802
Work Tel. No. - 814-863-2378
Home Tel. No. - 814-861-6074
Url - http://ukradi.freehosting.net
Reply to : kxu110@psu.edu
0 Likes
221 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
I use the following to connect to AutoCAD 2000:

Public ThisDrawing As AcadDocument

Public Sub GetAcad(CurrentForm As Form)
On Error Resume Next

Dim appAcad As AcadApplication

Set appAcad = GetObject(, "AutoCAD.application")
If Err.Number <> 0 Then
Err.Clear
Set appAcad = CreateObject("AutoCAD.Application")
If Err.Number Then
MsgBox "Unable to launch AutoCAD"
Exit Sub
Set ThisDrawing = appAcad.ActiveDocument
End If
End If

appAcad.WindowState = acMin
appAcad.WindowState = acMax
appAcad.Visible = True

End Sub

...hope this does the trick for you.
"Karthikeyan" wrote in message
news:754F5DA248A01AADEB41D8EEB600C6B3@in.WebX.maYIadrTaRb...
> HI
>
> I want to connect AUTOCAD with VB or JAVA. Can anyone help me in this.
>
> I would appreciate it if any one tell me how to do it.
>
> --
> KARTHIKEYAN UMAPATHY
> Room No. 215, Leonhard Building
> Dept. of Industrial Engineering
> Penn. State University
> University Park
> PA - 16802
> Work Tel. No. - 814-863-2378
> Home Tel. No. - 814-861-6074
> Url - http://ukradi.freehosting.net
> Reply to : kxu110@psu.edu
>
0 Likes
Message 3 of 3

Anonymous
Not applicable
> I want to connect AUTOCAD with VB or JAVA. Can anyone help me in this.
>
> I would appreciate it if any one tell me how to do it.

There is Java code here that works in R14 and 2000:

http://www.autodesk.com/develop/devres/prodres/acad14/java.htm
0 Likes