Just out of curiosity, why don't you want to use the getobject method?
Registered forum members do not see this ad.
What I am trying to do is check all the instances of Autocad that are running and check for all of the open documents in each one. I have this working in VB6 but .NET is giving me problems. I can get the MainWindowTitle but the other documents open for that instance I have not been able to figure out. Sorry if this has been posted before but I am not sure if I am even on the right track. Any suggestions for this in .NET? I would prefer not to use GetObject(, "Autocad.Application"). Thanks Everybody

Just out of curiosity, why don't you want to use the getobject method?
Because it does not want to work, I was looking for other options, I wanted to move out of the VB6 era. I am using VS2008 so I may not have any other options. I am trying to find out. Thanks again.
It is the Do Something I am trying to figure out.
This returns the MainWindowTitle
AutoCAD Map 3D 2010 - [Drawing1.dwg] First instance
AutoCAD Map 3D 2010 - [A5119.DWG] Second Instance
If I have multiple files open in each instance I want the WindowTitle for each one.
Dim p() As Process = Process.GetProcessesByName("Acad")
ForEach proc As Process In p
Debug.Print(proc.MainWindowTitle)
For Each AcadDocument in proc...?
Next
Iterate through each instance and each document and return the window title.
Instead, why not simply iterate the Documents Collection for each instance of AutoCAD?
Perhaps this will be helpful: Control the Drawing Windows
"Potential has a shelf life." - Margaret Atwood
That is what I am trying to do.
One step further...
Iterate through a Collection Object
"Potential has a shelf life." - Margaret Atwood
What if none of these will import?
'Imports Autodesk.AutoCAD.Runtime
'Imports Autodesk.AutoCAD.ApplicationServices
'Imports Autodesk.AutoCAD.DatabaseServices
'Imports Autodesk.AutoCAD.EditorInput
Registered forum members do not see this ad.
Then you're missing Assembly Reference(s).
... In Solution Explorer, Select the 'Show All Files' button, and expand the References node... Within, you should have AcDbMgd.dll, and AcMgd.dll added (be sure they both have 'Copy Local' = False in the Properties window).
If you do not know what these Assembly References are, see this thread.
"Potential has a shelf life." - Margaret Atwood
Bookmarks