Login Page - Create Account

Support Board


Date/Time: Fri, 19 Jan 2018 23:43:38 +0000



Post From: SetString outside of default block

[2016-07-13 06:08:53]
onnb - Posts: 462
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);