1.
{code}
m_sAcadProdID = "AutoCAD.Application"
Try
If IsNothing(m_oAcadApp) Then
m_oAcadApp = GetObject(, "Autocad.Application")
End If
Catch exc As Exception
Dim AcadProg As System.Type
AcadProg = System.Type.GetTypeFromProgID(m_sAcadProdID)
m_oAcadApp = System.Activator.CreateInstance(AcadProg, True)
'Instead above two lines of code, simply use following new ().
'However, this always creates an instance of the
'AutoCAD even if it is already running.
'm_oAcadApp = new AutoCAD.AcadApplicationClass();
Dim sMessage As String
sMessage = exc.Message.ToString() ' to avoid from complier warning.
End Try
If IsNothing(m_oAcadApp) = False Then
m_oAcadApp.Visible = True
Project_Statistics_Btn.Enabled = True
End If{code}
2. once you have the instance of autocad you can call m_oAcadApp.Documents.Open()
3. by accessing the documents through m_oAcadApp.Documents
All this info is available in the ObjectARX SDK which i recommend you download.
http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=1911627