Author Topic: Access to EA repository is not working : EA15.0  (Read 608 times)

SevEd

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Access to EA repository is not working : EA15.0
« 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:

Code: [Select]
        '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
« Last Edit: April 18, 2024, 12:08:45 am by SevEd »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 12996
  • Karma: +544/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Access to EA repository is not working : EA15.0
« Reply #1 on: April 18, 2024, 01:49:19 am »
Is EA running when you execute that code?

Maybe re-installing EA can help?

Geert

SevEd

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Access to EA repository is not working : EA15.0
« Reply #2 on: April 18, 2024, 07:56:48 pm »
Hi Geert,

Yes, EA is running when this code is executed.

I'll try that, Thanks!!


Edgar S.