Support Board
Date/Time: Fri, 07 Nov 2025 17:54:36 +0000
Post From: Using function: sc.SetPersistentSCStringForChartStudy() crashes SC
| [2019-09-16 12:10:17] |
| @sstfrederik - Posts: 410 |
|
Run the below code and let me know if you can reproduce the problem. SCSFExport scsf_Receiving_SCString(SCStudyInterfaceRef sc)
{ if (sc.SetDefaults) { // Set the configuration and defaults sc.GraphName = "Receiving SCString"; sc.StudyDescription = "Receiving SCString"; sc.AutoLoop = 0; return; } SCString& SomeString = sc.GetPersistentSCString(0); // Do data processing if (sc.UpdateStartIndex == 0 && sc.IsFullRecalculation) { sc.AddMessageToLog(SomeString,1); } } SCSFExport scsf_Sending_SCString(SCStudyInterfaceRef sc) { SCInputRef ChartStudyReference = sc.Input[0]; if (sc.SetDefaults) { // Set the configuration and defaults sc.GraphName = "Sending SCString"; sc.StudyDescription = "Sending SCString"; ChartStudyReference.Name = "Chart Study Reference"; ChartStudyReference.SetChartStudyValues(1, 0); sc.CalculationPrecedence = LOW_PREC_LEVEL; sc.AutoLoop = 0; return; } // Do data processing if (sc.UpdateStartIndex == 0 && sc.IsFullRecalculation) { sc.SetPersistentSCStringForChartStudy(ChartStudyReference.GetChartNumber(),ChartStudyReference.GetStudyID(),0,"This is a test string"); } } |
