Login Page - Create Account

Support Board


Date/Time: Fri, 29 Mar 2024 13:17:29 +0000



Post From: SetString outside of default block

[2016-07-13 06:08:53]
onnb - Posts: 660
See code below. If I run it, I see "tmp" printed once on sc.Index == 0 and then I see "Invalid" for the rest. Is that expected?


SCSFExport scsf_test_string(SCStudyInterfaceRef sc)
{
  REFS;

  if (sc.SetDefaults)
  {
    sc.GraphName = "Test String";
    sc.StudyDescription = "";
    sc.AutoLoop = 0;
    sc.GraphRegion = 0;
    sc.UpdateAlways = 1;
    sc.FreeDLL = 0;


    return;
  }

  if (sc.Index == 0)
    sc.Input[0].SetString("tmp");


  SCString str = sc.Input[0].GetString();

  sc.AddMessageToLog(str, 0);