Hi,
We support our internal .NET application written in VB.NET which currently uses Refinitiv Eikon version 4.0. Because of migration to LSEG Workspace from Eikon we try to modify our application which is using just a few functions from Eikon API:
EikonDesktopDataAPI.Initialize() + EikonDesktopDataAPI.Status
EikonDesktopDataAPI.CreateAdxForexModule().FxCalcPeriod
EikonDesktopDataAPI.CreateAdxForexModule().AdFxSwpTpSwp
EikonDesktopDataAPI is automatically available in the installation folder after installation of Refinitiv Eikon. But installation folder of LSEG Workspace doesn’t contain any prepared library with APIs and I think we should download it separately.
We have checked the samples from LSEG Data Library for .NET Examples from the link
https://developers.lseg.com/en/article-catalog/article/migrating-eikon-dotnet-api-calls-to-workspace-dotnet
but we cannot understand all points in comparing to EikonDesktopDataAPI.
For example, with Eikon we simply use the function EikonDesktopDataAPI.Initialize() in Visual Basic .NET for connection to Eikon:
Public Function ConnectToEikon(Optional ByRef sErrorInfo As String = "") As String
Try
' Create the Eikon Desktop object
If Me.edDataAPI Is Nothing Then
Me.edDataAPI = New EikonDesktopDataAPI.EikonDesktopDataAPI
End If
' Initialize the Eikon Desktop object to connect to Eikon
Dim eResult As EEikonDataAPIInitializeResult
eResult = Me.edDataAPI.Initialize()
If (eResult <> EEikonDataAPIInitializeResult.Succeed) Then
Me.DisconnectFromEikon()
If (eResult = EEikonDataAPIInitializeResult.Error_Reinitialize) Then
ConnectToEikon = "Error_Reinitialize"
ElseIf eResult = EEikonDataAPIInitializeResult.Error_InitializeFail Then
ConnectToEikon = "Error_InitializeFail"
Else
ConnectToEikon = eResult.ToString
End If
Else
ConnectToEikon = "Succeed"
End If
Catch ex As Exception
ConnectToEikon = "Exception_ConnectToEikon"
sErrorInfo = ex.Message.ToString
End Try
End Function
After running the function, the GUI of Eikon application starts and we enter the login credentials of our Eikon user for access.
We have compiled the LSEG API Sample “1.2 – DesktopSession” from the source at the begin of this question, using LSEG.Data.dll, but we have the following error:
State: Pending. DesktopSession is Pending
Event: SessionAuthenticationFailed. {
“Message”: “No connection could be made because the target machine actively refused it. (localhols:9001)”,
“StatusUrl”: https://localhost:9001/api/status”
}
State: Closed. DesktopSession is Closed
Session failed to open
Could somebody help or give some recommendations how we can correctly organize connection to the Workspace using .NET API?
Thank you in advance!