Message 1 of 7

Not applicable
10-18-2017
06:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I have inherited a project with some AutoCAD VBA code that works fine with AutoCAD 2013. However, I'm trying to upgrade this project to AutoCAD 2015 as a temporary solution and am running into a problem trying to set the Active Document. (Both AutoCAD versions are 32 bit)
When all code is the same, this statement works in AutoCAD 2013, but not in AutoCAD 2015:
ThisDrawing.Application.Documents.Item(1).Activate
The same is true for the following statement:
ThisDrawing.Application.ActiveDocument = AcadApplication.Documents.Item(1)
Is there another way to perform this action for AutoCad 2015?
thank you in advance!
Patrick
Solved! Go to Solution.