Pinnacle : Execute
Description
- “Execute” is used to run a command stored in a string.
- It can be utilized when using a variable in a command is not possible.
- It is also particularly useful for dynamically generating a command.
- The command can be hardcoded into the script or created by a script
- This command is different than “ExecuteNow” which is used to run a script
- Execute can be run with either =””; or =1;. Both should work for all situations.
Examples
Execute a command dynamically generated by a script.
//Displays the DVH corresponding to the current trial.
Store.StringAt.SelectDVHTrial = "PluginManager.PlanEvalPlugin.TrialList.#";
Store.At.SelectDVHTrial.AppendString = TrialList.Current.Index; //Uses current trial to specify DVH to display
Store.At.SelectDVHTrial.AppendString = ".Selected =1"
Store.At.SelectDVHTrial.Execute = 1; //or ="";
Execute a command hardcoded into a script.
//Displays the DVH corresponding to the second trial (index 1).
Store.StringAt.SelectDVHTrial = "PluginManager.PlanEvalPlugin.TrialList.#1.Selected = 1;";
Store.At.SelectDVHTrial.Execute = 1;
Create an IF-THEN test and then execute that test on multiple objects by utiliziing a loop.
//This command will output a message if PTV is present in RoiList.
Store.StringAt.str = "PTV";
Store.StringAt.tst = "IF.RoiList.Current.Name.STRINGEQUALTO.Store.StringAt.str.THEN.InfoMessage = message"; //***Quotes around the "message" are not necessary
RoiList.ChildrenEachCurrent.#"@".Store.At.tst.Execute = "";
Use to set a parameter (loop or single instance).
Store.StringAt.Action="TrialList.Current.BeamList.Current.Machine=MachineName";//Do not use quotes around the machine name
TrialList.ChildrenEachCurrent.#"@".Store.At.Action.Execute=""; //Change 1st beam in all trials
//Or change only the first beam in the current tria
Store.At.Action.Execute=1;