String Variables

Declaration

Actions

Append

It is necessary to use the "Store.At." form of the variable instead of "Store.StringAt." when appending to the variable.

Store.StringAt.ExampleString = "This is "; //Variable ExampleString = "This is"
Store.At.ExampleString.AppendString = "a test."; //Variable ExampleString =  "This is a test."
Store.StringAt.ExampleString = "This is "; //Variable ExampleString = "This is"
Store.At.ExampleString.AppendString = Store.StringAt.Something;

Boolean Tests

CONTAINS

IS

This doesn't seem to work any longer.

IsNull

This test is case sensitive. Make sure you use IsNull and not ISNULL.

STRINGNOTEQUALTO

STRINGEQUALTO

Examples

Comparing a string directly:

IF.TrialList.Current.BeamList.Current.PrevBeamType.STRINGEQUALTO.#"#Static".THEN.InfoMessage= "Static beam type"; //For direct string comparison use syntax #"#Any String"

Comparing a variable:

Store.StringAt.TempPos = "On back (supine)";
IF.PatientSetup.Position. STRINGEQUALTO. Store.StringAt.TempPos. THEN. InfoMessage= "Patient position is supine";

Comparing two strings:

Store.StringAt.ContourOnOff=RoiList.Current.Display2d;
String.StringAt.Off="Off";

//Use "StringAt" for string comparison
IF. Store.StringAt.ContourOnOff. STRINGEQUALTO. Store.StringAt.Off. Then.Infomessage="ROI off";

//Or compare to "Off" directly as demonstrated above
IF. Store.StringAt.ContourOnOff. STRINGEQUALTO.#"#Off". Then.Infomessage="ROI off";

Typecast to Float Variable

Unlike typecasting from Float to String, the variables must use the full variable definition "FloatAt" and "StringAt"..

Store.StringAt.Text=7;

///------*****This step typecasts****
Store.FloatAt.Number = Store.StringAt.Text;
//----------

Store.At.Number.Add=1;
InfoMessage = Store.At.Number;
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License