Message 1 of 4
Openning DWG > Automation error

Not applicable
06-17-2014
07:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm beginer in VBA and I'm trying to write easy program in VBA. But I have a problem with openning DWG file. I have reduced code to basic problem part:
Sub testing()
Dim aplikace As AcadApplication
Set aplikace = ThisDrawing.Application
aplikace.Documents.Open "c:\temp\sablona_list1.dwg", True
Set prostor = ThisDrawing.ModelSpace
End Sub
If it run first time, it will end by automation error. But if I press "Debug" and "F5" it will run to end. Do you know where can be mistake?