question

jason.gunther avatar image
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)
10 |1500

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

Jirapongse avatar image
45.2k 103 43 60

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 
1 comment
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.

Zhenya Kovalyov avatar image
4.6k 26 7 22

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

10 |1500

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