2 using System.Collections.Generic;
4 using Seci.Definitions;
6 namespace Seci.Standard
15 public static String FilePath {
get {
return _filePath; } }
22 _filePath = Status.SampleParametersVI;
25 LabView.LabViewApp.LoadVI(_filePath,
true);
28 LabView.LabViewApp.StartVI(_filePath);
36 LabView.LabViewApp.ShowVI(_filePath);
44 LabView.LabViewApp.HideVI(_filePath);
55 Object val = LabView.LabViewApp.GetRawValue(_filePath,
"Additional Parameters");
57 return (String[,])val;
73 Object val = LabView.LabViewApp.GetRawValue(_filePath,
"Standard Parameters");
75 String[,] temp = (String[,])val;
76 List<String> vals =
new List<String>();
78 for (
int i = 0; i < temp.GetLength(0); ++i)
99 Object val = LabView.LabViewApp.GetRawValue(_filePath,
"Types");
101 return new List<String>((String[]) val);
118 LabView.LabViewApp.SetRawValue(_filePath,
"Standard Parameter Name", index);
119 LabView.LabViewApp.SetRawValue(_filePath,
"Standard Parameter Value", value);
120 LabView.LabViewApp.SetRawValue(_filePath,
"Add Standard Parameter",
true);
124 throw new Exception(
"Could not set parameter. Error message is: " + e.Message);
135 public static void CreateParameter(String name,
int typeIndex, String units, String value)
139 LabView.LabViewApp.SetRawValue(_filePath,
"Custom Parameter Name", name);
140 LabView.LabViewApp.SetRawValue(_filePath,
"Custom Parameter Type", typeIndex);
141 LabView.LabViewApp.SetRawValue(_filePath,
"Custom Parameter Units", units);
142 LabView.LabViewApp.SetRawValue(_filePath,
"Custom Parameter Value", value);
143 LabView.LabViewApp.SetRawValue(_filePath,
"Add Custom parameter",
true);
147 throw new Exception(
"Could not set parameter. Error message is: " + e.Message);
159 List<String> stdNames =
new List<String>(GetParameterNames());
161 if (stdNames.Contains(name))
165 int index = stdNames.IndexOf(name);
166 LabView.LabViewApp.SetRawValue(_filePath,
"Standard Parameter Name", index);
167 LabView.LabViewApp.SetRawValue(_filePath,
"Remove Standard Parameter",
true);
173 LabView.LabViewApp.SetRawValue(_filePath,
"Custom Parameter Name", name);
174 LabView.LabViewApp.SetRawValue(_filePath,
"Remove Custom Parameter",
true);
179 throw new Exception(
"Could not remove parameter. Error message is: " + e.Message);
static void CreateParameter(int index, String value)
Adds a standard parameter to the VI.
static List< String > GetParameterTypes()
Method for retrieving the standard parameter types for creating a new parameter.
static String[,] GetParameters()
Method for retrieving the parameters associated with the current experiment.
static void HideVi()
Method for hiding the VI - it is hidden by default.
static void CreateParameter(String name, int typeIndex, String units, String value)
Adds a custom parameter to the VI.
static void ShowVi()
Method for showing the VI - it is hidden by default.
static List< String > GetParameterNames()
Method for retrieving the standard parameter names for creating a new parameter.
static void Initialise()
Method for loading and starting the VI.
static void RemoveParameter(String name)
Remove a parameter to the VI.
This class is a wrapper for the Sample Parameters VI.