Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: SevEd on April 18, 2024, 12:06:52 am
-
Hello everyone,
Looking for some help.
I'm using vba-based application to access repository. and last week after W11 was applied in multiple computers, there is one that stops working in this specific piece of code when creating the connecting to repository.
So, when trying to execute any api in the EaRepository, then an error is poping up.
Here is the complete snip:
'Make sure the EA project exists
If winLib_VerifyFileExists(strProjectFile) = True Then
'Create Repository
Set EaApp = GetObject(, "EA.App")
Set EaRepository = EaApp.Repository
'Open EA Project repository
If EaRepository.ConnectionString <> strProjectFile Then
EaRepository.OpenFile (strProjectFile)
MsgBox ("Project loaded correctly")
Else
MsgBox ("Project is already loaded")
End If
Else
MsgBox ("File not found / Project cannot be open")
End If
....
EaRepository.GetPackageByGuid(strStartPackageGUID)
Set EaApp = GetObject(, "EA.App") ---> it's getting null
Set EaRepository = EaApp.Repository --> it's getting null
EaRepository.GetPackageByGuid(strStartPackageGUID) ---> get an Error
EA version 15
Windows version: 10 Pro and 11 Pro
Do you have any idea what could be wrong? where I could look into? This seems an error from system, but not sure what.
Thanks for all your tips and recommendations!
Best regards,
Edgar Sevilla
-
Is EA running when you execute that code?
Maybe re-installing EA can help?
Geert
-
Hi Geert,
Yes, EA is running when this code is executed.
I'll try that, Thanks!!
Edgar S.