RTD sample not working

Add-in Express™ Support Service
That's what is more important than anything else

RTD sample not working
RTD Sample not working 
Jon Chen Chen


Guest


Hi,

I have just installed Add-In Express VCL 2007. I compiled MyFirstRTDServer.dll and registered it fine. When I ran the book1.xls sample, all I got was '#N/A' error. Am I missing something? I am running Excel XP. Thanks.

Jon
Posted 10 Apr, 2007 11:22:21 Top
Dmitry Kostochko


Add-in Express team


Posts: 2880
Joined: 2004-04-05
Hi Jon,

What macro security level do you have in your Excel 2002? Try to set it to Medium.

P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.

Posted 11 Apr, 2007 07:05:15 Top
Jon Chen


Guest


Dmitry,

That fixed the problem. It would be nice to have a small readme file on each example. I think that will reduce your technical support work as well. Thanks for the help.

Jon
Posted 11 Apr, 2007 08:17:37 Top
Jon Chen


Guest


Dmitry,

I tried to change the update interval from 2000 to some other value and it does seem to change the update frequency. Ideally, I like to have Excel update cells when the data has changed instead of updating cells on a constant interval. I set up a timer with 1 second and call UpdateTopics method and it doesn't work either. Am I doing something wrong here?

I read a MSN article about RTD updating: http://msdn2.microsoft.com/en-us/library/aa140060(office.10).aspx
It mentions about UpdateNotify method. How do I invoke and integrate it with Add-In Express? Do you have a Delphi example on this topic?

Thank in advance.

Jon
Posted 11 Apr, 2007 12:03:18 Top
Dmitry Kostochko


Add-in Express team


Posts: 2880
Joined: 2004-04-05
Hi Jon,

If you need to set the update interval less than 2 seconds, you need to change the following registry key:

HKEY_CURRENT_USER\Software\Microsoft\Office\<EXCEL_VERSION>\Excel\Options\RTDThrottleInterval

-1: this is considered a manual mode, and Excel only checks for updates when Excel.Application.RTD.RefreshData is called.
0: Excel checks for updates every chance it gets.
>0: Excel waits at least that number of milliseconds between checks for updates.

The default value is 2000 milliseconds.

It mentions about UpdateNotify method. How do I invoke and integrate it with Add-In Express?


See the UpdateTopics method of the TadxXLRTDServerModule class.

Posted 12 Apr, 2007 06:30:53 Top
Jon Chen


Guest


Dmitry,

Do I need to change the registry key instead of just change the TRTDServer.Interval? If that is the case, what is the 'Interval' for?

Where do I find the reference of UpdateTopics method since there is no help file? I could not find any information on the Development Guide.

Jon
Posted 12 Apr, 2007 08:45:32 Top
Dmitry Kostochko


Add-in Express team


Posts: 2880
Joined: 2004-04-05
Hi Jon,

If you need to update your data in a time interval less than 2000 miliseconds you need to change the registry key mentioned in my post above and set the Interval property to the value you need.

Also, could you please explain me your task in more detail, I will try to create an example for you.

Posted 13 Apr, 2007 06:15:06 Top
Jon Chen


Guest


Dmitry,

What I try to accomplish is a realtime quote module using RTD. In this RTD module, it will accept subscription on symbol/field pairs from RTD(). It in term submits the request to a host application running on the same machine using either TCP or Shared Memory. The host application will stream the updates to the RTD module. So instead of update spreadsheet in a fixed interval, I like to update it when there are updates from the host. I hope I explain it clearly. Thanks.

Jon
Posted 13 Apr, 2007 08:01:05 Top
Dmitry Kostochko


Add-in Express team


Posts: 2880
Joined: 2004-04-05
Hi Jon,

Thank you for the explanation.

You can download the example below:
http://www.add-in-express.com/projects/adx-xl-rtd-addin-manual-update-d7.zip

Posted 16 Apr, 2007 03:27:23 Top
Michael Krupsdahl




Posts: 1
Joined: 2006-02-19
Hi Dmitry,
Am I correct in that UpdateTopics will make excel request refreshdata from the server for every topic assigned on the RTDServerModule.

Say I have a RTDServerModule with 20 topics all created at runtime and they share a single onrefreshdata callback, is it possible to have an update event that only will be called from Excel for the topics which has data changed.

Michael
Posted 18 Apr, 2007 17:35:36 Top