Login Page - Create Account

Support Board


Date/Time: Thu, 09 May 2024 13:48:03 +0000



Post From: sc.StartChartReplay not working when new Chartbook opened

[2019-10-24 21:15:07]
Chad - Posts: 231
My developer is testing the new ACSIL functions for Chart Replays, and has noted that, when testing the function in an existing Chartbook, it works as expected. If that Chartbook is closed, then a new one opened, and this function is tested anew, there is no result. It is not seen to be due to something obvious, such as the name of the Chartbook. Here is the code being used for start Replay from the study:

int& ReplayStarted = sc.GetPersistentInt(4);
if (ReplayStarted == 0) {
SCDateTime dt;
dt.SetDate(sc.GetCurrentDateTime().GetDate());
dt.SetTimeHMS(12, 0, 0);
dt.SubtractDays(1);
int rc = sc.StartChartReplay(sc.ChartNumber, ReplaySpeedRef.GetFloat(), dt);
sc.AddMessageToLog(msg.Format("StartChartReplay return value: %d", rc), 0);
ReplayStarted = 1;
return;
}

Could you please test this workflow (open new book then call function) and see if it's working as-expected on your system?