Programatically connect to Eikon and create Dex2 Manager
I'm using the example code CSharpEikonnect and trying to create Dex2 Manager by calling CreateDex2Mgr() immediately after ConnectToEikon() completes. I also tried to call CreateDex2Mgr() from the OnStatusChanged method after the connection to Eikon is successful but in both cases I get the exception below. Is it possible to programatically connect to Eikon and create Dex2 manager?
Exception:
System.Runtime.InteropServices.COMException: 'The system cannot locate the object specified.
Best Answer
-
More than likely you're calling CreateDex2Mgr function before your application connected to Eikon. When MyEikonDesktopDataAPI.Initialize returns EEikonDataAPIInitializeResult.Succeed, it does not mean the application is already connected to Eikon. It just means the Initialize method was called successfully. OnStatusChanged event being triggered also does not necessarily mean the application is connected to Eikon. Inside OnStatusChanged event handler you need to check the value of EStatus parameter. Outside of this event handler you can check the value of MyEikonDesktopDataAPI.Status property. CreateDex2Mgr function will only execute successfully if either EStatus or MyEikonDesktopDataAPI.Status value is EEikonStatus.Connected. In the example UpdateUserFormAccordingToConnectionStatus procedure enables "Create Dex2 Manager" button only once the value of EStatus parameter passed to OnStatusChanged event handler is EEikonStatus.Connected.
For full documentation on EikonDesktopDataAPI library refer to the Developer Reference Guide under the Documentation tab:
https://developers.thomsonreuters.com/eikon-com/eikon-desktop-data-api/docs?content=7861
Answers
-
Hi @IS
Do I understand correctly that when following the example and creating Dex2Mgr object by clicking Create Dex2 Manager button in the user form everything works as expected? However when you modify the example and call CreateDex2Mgr method from within ConnectToEikon procedure or from within OnStatusChanged callback you get the exception? Are there any further details on the exception?
0 -
That is correct Alex. I tried creating Dex2Mgr object in several different ways including from the ConnectToEikon and OnStatusChanged methods. I got the same error in each case. For example the error details below occurred when I called CreateDex2Mgr() from Form1 immediately after connecting to Eikon.
System.Runtime.InteropServices.COMException occurred
HResult=0x80004005
Message=The system cannot locate the object specified.
Source=msxml3.dll
StackTrace:
at EikonDesktopDataAPI.IEikonDesktopDataAPI.CreateDex2Mgr()
at CSharpEikonnect.Form1.CreateDex2Mgr() in C:…\CSharp\Form1.cs:line 90
at CSharpEikonnect.Form1..ctor() in C:\...Form1.cs:line 29
at CSharpEikonnect.Program.Main() in C:\...\Program.cs:line 18
0 -
Thanks Alex! That was it, I was able to watch the status and Create Dex2 after the status was Connected.
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛