vb.net activedocument Missing

vb.net activedocument Missing

arcticad
Advisor Advisor
1,078 Views
1 Reply
Message 1 of 2

vb.net activedocument Missing

arcticad
Advisor
Advisor
I'm trying to set a drawing active by using an external VB.net program
The ActiveDocument method doesn't exist.

Anyone know how to do this?

{code}

AcadApp = GetObject(, "AutoCAD.Application.17.2")

For k = 0 To acadApp.Documents.count - 1
If acadApp.documents(k).path & "\" & acadApp.documents(k).name = DwgName Then
Try
'acadApp.application.activedocument = acadApp.documents(k) ' <-- Not Valid
Catch ex As Exception
End Try
End If
Next
{code}
---------------------------



(defun botsbuildbots() (botsbuildbots))
0 Likes
1,079 Views
1 Reply
Reply (1)
Message 2 of 2

arcticad
Advisor
Advisor
In case anyone has the issue. If you I late bound AutoCAD it doesn't work.

Early Binding fixes the problem.

Public acadApp As Autodesk.AutoCAD.Interop.AcadApplication
---------------------------



(defun botsbuildbots() (botsbuildbots))
0 Likes