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

Load AutoCAD from VB.Net (Newbie)

3 REPLIES 3
Reply
Message 1 of 4
cjuliano
357 Views, 3 Replies

Load AutoCAD from VB.Net (Newbie)

Can someone help me to:

1. Connect to AutoCAD 2004 or higher using VB.Net
2. Open AutoCAD if not open already
3. Open a drawing if AutoCAD is already open.

All help will be greatly appreciated.

Cujo

PS - presume I am starting with only a drawing name so if there are imports, etc. I'll need those as well.

Thanks!!!!!
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: cjuliano


I'm very new to VB.net too, but play with it
occasionally.  Here is a way to open a cad dwg, then renaming it.  The
form has two buttons on it, one labeled to start and one to save
as.

 

 


Inherits
System.Windows.Forms.Form


#

Region " Windows Form
Designer generated code "


Public
color=#0000ff size=2>Sub

size=2>New
()


MyBase.New()


'This call is required by the Windows Form
Designer.


InitializeComponent()


'Add any initialization after the
InitializeComponent() call


End
color=#0000ff size=2>Sub


'Form overrides dispose to clean up the
component list.


Protected
color=#0000ff size=2>Overloads

size=2>Overrides

size=2>Sub
Dispose(
size=2>ByVal
disposing
size=2>As

size=2>Boolean
)


If disposing
Then


If
color=#0000ff size=2>Not
(components
color=#0000ff size=2>Is

size=2>Nothing
)
size=2>Then


components.Dispose()


End
color=#0000ff size=2>If


End
color=#0000ff size=2>If


MyBase
size=2>.Dispose(disposing)


End
color=#0000ff size=2>Sub


'Required by the Windows Form
Designer


Private components
As
System.ComponentModel.IContainer


'NOTE: The following procedure is required
by the Windows Form Designer


'It can be modified using the Windows Form
Designer.


'Do not modify it using the code
editor.


Friend
color=#0000ff size=2>WithEvents
Button1
color=#0000ff size=2>As
System.Windows.Forms.Button


Friend
color=#0000ff size=2>WithEvents
Button2
color=#0000ff size=2>As
System.Windows.Forms.Button


<System.Diagnostics.DebuggerStepThrough()>


size=2>Private

size=2>Sub
InitializeComponent()


Me.Button1 =
New
System.Windows.Forms.Button


Me.Button2 =
New
System.Windows.Forms.Button


Me.SuspendLayout()


'


'Button1


'


Me.Button1.Location =
New
System.Drawing.Point(56, 232)


Me.Button1.Name =
"Button1"


Me.Button1.TabIndex =
0


Me.Button1.Text =
"Start Cad"


'


'Button2


'


Me.Button2.Location =
New
System.Drawing.Point(152, 232)


Me.Button2.Name =
"Button2"


Me.Button2.TabIndex =
1


Me.Button2.Text =
"SaveAs"


'


'Form1


'


Me.AutoScaleBaseSize =
New System.Drawing.Size(5,
13)


Me.ClientSize =
New
System.Drawing.Size(292, 273)


Me
size=2>.Controls.Add(
Me
size=2>.Button2)


Me
size=2>.Controls.Add(
Me
size=2>.Button1)


Me.Name = "Form1"


Me.Text = "Form1"


Me
size=2>.ResumeLayout(
False
size=2>)


End
color=#0000ff size=2>Sub


#

End
color=#0000ff size=2>Region


' Private output As
FileStream


' Dim myStream As Stream


size=2>

' Dim openFileDialog1 As New
OpenFileDialog


Dim myCad
color=#0000ff size=2>As

Autodesk.AutoCAD.Interop.AcadApplication


Dim myDwg
color=#0000ff size=2>As

Autodesk.AutoCAD.Interop.AcadDocument


Private
color=#0000ff size=2>Sub
Button1_Click(
color=#0000ff size=2>ByVal
sender
size=2>As
System.Object,
size=2>ByVal
e
size=2>As
System.EventArgs)
size=2>Handles
Button1.Click


Dim openFileDialog1
As
color=#0000ff size=2>New
OpenFileDialog


openFileDialog1.Filter = ("Drawing|*.dwg")


 


 


myCad =

New
Autodesk.AutoCAD.Interop.AcadApplication


myDwg =

New
Autodesk.AutoCAD.Interop.AcadDocument


 


 


 


End
color=#0000ff size=2>Sub


 


 


 


Private
color=#0000ff size=2>Sub
Button2_Click(
color=#0000ff size=2>ByVal
sender
size=2>As
System.Object,
size=2>ByVal
e
size=2>As
System.EventArgs)
size=2>Handles
Button2.Click


 


Dim myStream
As Stream


Dim saveFileDialog1
As
color=#0000ff size=2>New
SaveFileDialog


Dim strCurName
As
color=#0000ff size=2>String


 


saveFileDialog1.Filter = "Drawing Files (*.dwg)|*.dwg"


saveFileDialog1.FilterIndex = 1


saveFileDialog1.RestoreDirectory =


size=2>True


saveFileDialog1.ShowDialog()


 


strCurName = saveFileDialog1.FileName.ToString


 


myCad.ActiveDocument.SaveAs(strCurName)


 


End
color=#0000ff size=2>Sub


End


size=2>Class



style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Can
someone help me to:

1.  Connect to AutoCAD 2004 or higher using
VB.Net
2.  Open AutoCAD if not open already
3.  Open a drawing
if AutoCAD is already open.

All help will be greatly
appreciated.

Cujo

PS - presume I am starting with only a drawing
name so if there are imports, etc. I'll need those as
well.

Thanks!!!!!
Message 3 of 4
Anonymous
in reply to: cjuliano


I noticed I let some of the trash in my code, sorry
about that, you can get rid of some of the comments and anything to do with
stream.   It was just some stuff I was playing with.  Also, you
must add in the autocad reference.  Depending on what you want to do with
your dwgs, add the respective references.  Below is the same thing cleaned
up.

 

Mike

 

 


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">


color=#0000ff size=2>Dim
myCad
size=2>As
Autodesk.AutoCAD.Interop.AcadApplication



Dim myDwg
As
Autodesk.AutoCAD.Interop.AcadDocument


 


 


Private
color=#0000ff size=2>Sub
Button1_Click(
color=#0000ff size=2>ByVal
sender
color=#0000ff size=2>As
System.Object,
color=#0000ff size=2>ByVal
e
size=2>As
System.EventArgs)
size=2>Handles
Button1.Click


Dim openFileDialog1
As
color=#0000ff size=2>New
OpenFileDialog


openFileDialog1.Filter = ("Drawing|*.dwg")


 


myCad = New
Autodesk.AutoCAD.Interop.AcadApplication


myDwg = New
Autodesk.AutoCAD.Interop.AcadDocument


End
color=#0000ff size=2>Sub


 


Private
color=#0000ff size=2>Sub
Button2_Click(
color=#0000ff size=2>ByVal
sender
color=#0000ff size=2>As
System.Object,
color=#0000ff size=2>ByVal
e
size=2>As
System.EventArgs)
size=2>Handles
Button2.Click


 


Dim saveFileDialog1
As
color=#0000ff size=2>New
SaveFileDialog


Dim strCurName
As
color=#0000ff size=2>String


saveFileDialog1.Filter = "Drawing Files (*.dwg)|*.dwg"


saveFileDialog1.FilterIndex = 1


saveFileDialog1.RestoreDirectory =


size=2>True


saveFileDialog1.ShowDialog()


strCurName = saveFileDialog1.FileName.ToString


myCad.ActiveDocument.SaveAs(strCurName)


 


End
color=#0000ff size=2>Sub


End


size=2>Class

Message 4 of 4
Anonymous
in reply to: cjuliano




style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">   

style="COLOR: blue">Dim
myCad As
Autodesk.AutoCAD.Interop.AcadApplication



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">   

style="COLOR: blue">Dim
myDwg As
Autodesk.AutoCAD.Interop.AcadDocument



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">   

style="COLOR: blue">Private
Sub
Button1_Click(ByVal sender
style="COLOR: blue">As
System.Object,
style="COLOR: blue">ByVal
e As
System.EventArgs) Handles
Button1.Click



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">     



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">       
Dim blnRunning
style="COLOR: green">' As Boolean



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">       
Dim objProcess
style="COLOR: green">' As Object



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">       
' check to see if Acad is already running if
running, do not start new instance of program



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">       
blnRunning = False



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">       
For
style="COLOR: blue">Each
objProcess In
GetObject("winmgmts:").ExecQuery("select * from
Win32_Process")



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">           
If LCase(objProcess.Name) = "acad.exe"
Then



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">               
blnRunning = True



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">               
Exit
style="COLOR: blue">For



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">           
End
style="COLOR: blue">If



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">       
Next '
objProcess



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">       
' if acad is not running start up the
application



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">       
If Not
(blnRunning) Then



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">           
Dim openFileDialog1
style="COLOR: blue">As
New
OpenFileDialog



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">           
Dim dwg
style="COLOR: blue">As

Autodesk.AutoCAD.Interop.AcadDocument



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">           
openFileDialog1.Filter = ("Drawing|*.dwg")



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">           
myCad = New
Autodesk.AutoCAD.Interop.AcadApplication



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">       
End
style="COLOR: blue">If



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">       
' open a new dwg in acad
application



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">       
myDwg = New
Autodesk.AutoCAD.Interop.AcadDocument



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes"> 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">   

style="COLOR: blue">End

style="COLOR: blue">Sub



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">

 
face=Arial color=#000000>This will be the last sample I'll bother you with, as I
mentioned, I'm new to VB programming too and thought I should try out the
things I posted.  It wasn't too stable so this gives more
stability if you open more than one dwg at a time. 
HTH



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">


face=Arial color=#000000>

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">


face=Arial color=#000000>Mike



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">


face=Arial color=#000000>

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">


face=Arial color=#000000>

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">


face=Arial color=#000000>

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">   

style="COLOR: blue">Private
Sub
Button2_Click(ByVal sender
style="COLOR: blue">As
System.Object,
style="COLOR: blue">ByVal
e As
System.EventArgs) Handles
Button2.Click



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">       
Dim myStream
style="COLOR: blue">As
Stream



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">       
Dim saveFileDialog1
style="COLOR: blue">As
New
SaveFileDialog



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">       
Dim strCurName
style="COLOR: blue">As

style="COLOR: blue">String



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">       
' save active open dwg to new
name



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">       
saveFileDialog1.Filter = "Drawing Files
(*.dwg)|*.dwg"



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">       
saveFileDialog1.FilterIndex = 1



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">       
saveFileDialog1.RestoreDirectory =
style="COLOR: blue">True



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">       
saveFileDialog1.ShowDialog()



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">       
strCurName = saveFileDialog1.FileName.ToString



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">       
myDwg = myCad.ActiveDocument



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">       
myDwg.SaveAs(strCurName)



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">

 



style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
style="mso-spacerun: yes">   

style="COLOR: blue">End

style="COLOR: blue">Sub



style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Can
someone help me to:

1.  Connect to AutoCAD 2004 or higher using
VB.Net
2.  Open AutoCAD if not open already
3.  Open a drawing
if AutoCAD is already open.

All help will be greatly
appreciated.

Cujo

PS - presume I am starting with only a drawing
name so if there are imports, etc. I'll need those as
well.

Thanks!!!!!

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