Hello everyone,
I've recently upgraded to AutoCAD 2025, and I’ve noticed a change in how it behaves when opening DWG files through VBA. In previous versions, if AutoCAD was closed and I used VBA to open a DWG, AutoCAD would launch and display the file on-screen. However, with AutoCAD 2025, the application opens but remains invisible (running in the background) until I manually bring it to the foreground or add code to set the visibility to true
This behavior affects the user experience, especially when running scripts that need to display the file for review or further interaction. I was wondering, has anyone else experienced this change in AutoCAD 2025 ?
Thanks,
MC
Show your code for how you open a dwg.
I think you should add some lines to your code
Dim acadapp As Object
' Try to get the AutoCAD application object
On Error Resume Next
Set acadapp = GetObject(, "AutoCAD.Application")
On Error GoTo 0
If acadapp Is Nothing Then
' AutoCAD is not open, so open it
Set acadapp = CreateObject("AutoCAD.Application")
Else
' AutoCAD is already open
acadapp.Documents.Add
End If
With acadapp.Visible = True
maybe you missed last line
Can't find what you're looking for? Ask the community or share your knowledge.