I have one query regarding the automation API of Enterprise Architect. I am using the below c# snippet for connecting to Enterprise Architect
EA.Repository EARepository = new EA.Repository();
bool isOpen = EARepository.OpenFile2("C:/EAProjects/SampleProject.eap", "admin", "password");
If the password is wrong in the above code, as soon as the second line executes a popup opens and it asks for correct credentials, and the isOpen variable is still not initialized or changed to false,
Is there a way to know that whether the provided credentials are valid or not using automation API.
What we wanted is as soon as wrong credentials are provided to connect to repository, it should throw an error or return some value indicating that provided credentials are invalid and it should not ask for any user interaction, so is there a way to achieve this.
Actually I want to run this code in background without any user interaction. I have checked the EA documentation but no clue.
Try
Repository.SuppressSecurityDialog = true
The documentation says:
So I guess that is right up your alley