question

Upvotes
Accepted
4 1 2 6

how do I initialize AdxRtHistory

code.txt

Trying to create a com object for Interday data from Eikon com/.net API

I initialize myAdxRtHist as follows:

Dim WithEvents myAdxRtHist As ThomsonReuters.Interop.RTX.AdxRtHistory

However I always get myAdxRtHist equal to nothing when i try to request the data as follows:

The attached file has the function with the problem starting on line 59. What do i need to initialize myAdxRtHist to within the function? I'm using Interop.RTX.dll as a reference.

eikoneikon-com-api.netvb
code.txt (7.1 KiB)
icon clock
10 |1500

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

Upvote
Accepted
78.8k 250 52 74

You can use MyEikonDesktopDataAPI.CreateAdxRtHistory() to create an instance of AdxRtHistory.

If myAdxRtHistory Is Nothing Then
      Try
           Dim obj As Object = MyEikonDesktopDataAPI.CreateAdxRtHistory()
           myAdxRtHist= CObj(obj)
      Catch ex As Exception
           myAdxRtHist = Nothing
      End Try
End If 
icon clock
10 |1500

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

Thank you so much, I'm a beginner to .Net. I've been programming with matlab, python, and R. So I'm on a steep curve.

Upvotes
4.6k 26 7 22

I suggest that you use the .NET Data API for this, you can check out the tutorial here.

icon clock
10 |1500

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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