Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon COM /
avatar image
Question by HFTVOL · Feb 02, 2017 at 02:55 AM · .netc# .netsdkdesktop api

Does the Eikon .Net Desktop API work in non WPF applications?

I get runtime errors when I call DataServices.Instance to retrieve IDataServices instance when I run the application from within a C# console application. Anything other than running it from within a WPF application does NOT work. Why is that the case and can this be remedied? I find using the Eikon Desktop .Net SDK API extremely limiting to run from within a WPF application. Can someone of the developers please comment whether something is missing or why I cannot run the APIs from within a Console Application, for example?

Thank you.

Matt

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Reply

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by jirapongse.phuriphanvichai · Feb 02, 2017 at 03:51 AM

Yes, you can create a C# console application with Eikon .NET Desktop API. The examples are available at https://developers.thomsonreuters.com/eikon-apis/net-apis-use-custom-applications/downloads. You can try Usage Example Realtime Data API.

A console application requires the Windows message pump in order to dispatch the retrieved events.

Comment

People who like this

0 Show 7 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
HFTVOL · Feb 02, 2017 at 04:01 AM 0
Share

Can you please clarify what you mean with a "Windows message pump" is needed? Can you give concrete example? As it stands I cannot even connect to Eikon from within a Console app.

avatar image
REFINITIV
jirapongse.phuriphanvichai ♦♦ · Feb 02, 2017 at 04:06 AM 0
Share

Have you tried Usage Example Realtime Data API from https://developers.thomsonreuters.com/eikon-apis/net-apis-use-custom-applications/downloads?

avatar image
HFTVOL · Feb 02, 2017 at 04:21 AM 0
Share

I did but pushing frames via Dispatcher and more importantly, blocking unless invoking "Frame.Continue" is completely unacceptable and violates most every efficient coding principle.

avatar image
HFTVOL · Feb 02, 2017 at 04:30 AM 0
Share

A much better way is to use Dispatcher.BeginInvoke() like

     Dispatcher.CurrentDispatcher.BeginInvoke(new Action(() =>
                {
                    _dataServices = DataServices.Instance;
                    _dataServices.StateChanged += DataServicesOnStateChanged;
                    _dataServices.Initialize("ReutersMarketDataPlugin");
                }));


But that still is extremely dirty. I was wondering whether another approach exists without having to use the UI thread or any message pumps.

avatar image
REFINITIV
Alex Putkov. ♦♦ HFTVOL · Feb 03, 2017 at 03:47 PM 0
Share

Hi @HFTVOL,

There's no way around having to run Windows message pump. The reason is there's a COM layer underneath .NET assemblies you interact with. And this COM layer cannot dispatch event notifications without Windows message pump running on the same thread. If you don't like using Dispatcher frames, you can instead use System.Windows.Forms.Application.Run method to kick off Windows message pump.

avatar image
HFTVOL · Feb 02, 2017 at 05:37 AM 0
Share

@jirapongse.phuriphanvichai,

I ran "DataApiUsageExampleTimeseriesData" in your referenced sample library.

How would I have to structure the Message Pump if I wanted to initialize ONCE but request "TimeSeriesRequest();" a second time without having to initialize the whole connection to Eikon again? That does not seem to work. Do I need to create a new DispatcherFrame, then submit a Reuters request, and then push the frame into the pump? Is that what I have to do for every request? And the code blocks on any callbacks from the Reuters API unless I set Frame.Continue to false. Is that correct?

avatar image
REFINITIV
jirapongse.phuriphanvichai ♦♦ HFTVOL · Feb 02, 2017 at 09:32 PM 0
Share

There is an example available in this question. The example creates a new DispatcherFrame for the new request. However, you can use the same DispatcherFrame by setting Frame.Continue to true and then calling Dispatcher.PushFrame(Frame) again.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
10 People are following this question.

Related Questions

Can not connect to EikonDesktopDataAPI using C# code.

Getting list of all nasdaq/nyse stocks

The underlying Eikon data services are not available

.net realtime example

Exception while calling CreateRData on Dex2.RData

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges