Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - prosacom

Pages: [1]
1
The error occured with VBA and VBScript (this supports only late binding).
The OpenFile method returns true with Early binding and false with late binding, both with the same EA project. Attepting to continue using the object, the exception is "61704 Internal error".

Thank you

G. Saviane

2
Get inspired from VB samples presented in the PDF document "EA automation" it seems to be possible to open a project with this code:
Quote
Public Sub Run()
try
''create the repository object
m_Repository = CreateObject("EA.Repository")
''open an EAP file
m_Repository.OpenFile("F:\Test\EAAuto.EAP")
''use the Repository in any way required
'DumpModel
''close the repository and tidy up
m_Repository.Exit()
m_Repository = Nothing
catch e as exception
Console.WriteLine(e)
End try
End Sub

but at the point I attempt to open the project the function returns false raising an exception upon continuation. Turning in a early binding fashiong things goes successfully:
Quote
Public Sub Run()
Dim m_Repository As New EA.Repository
try
''create the repository object
''open an EAP file
m_Repository.OpenFile("F:\Test\EAAuto.EAP")
''use the Repository in any way required
'DumpModel
''close the repository and tidy up
m_Repository.Exit()
m_Repository = Nothing
catch e as exception
Console.WriteLine(e)
End try
End Sub


What's wrong?

Pages: [1]