Method MatrixGetIndexFromLabel
- Namespace
- Skyline.DataMiner.Automation
- Assembly
- SLManagedAutomation.dll
MatrixGetIndexFromLabel(int, bool, string)
Gets the index of the input or output that corresponds with the specified input or output label.
public virtual int MatrixGetIndexFromLabel(int pid, bool input, string label)
Parameters
pidintThe ID of the matrix parameter.
inputbooltrueif the specified label is an input label; otherwise,false.labelstringThe label of the input (or output in case
inputisfalse).
Returns
- int
The corresponding index.
Examples
var dummy = engine.GetDummy("dummy1");
int index = dummy.MatrixGetIndexFromLabel(1000, false, "Output 10");
Remarks
The returned index is in the range 1..nrOfInputs or 1..nrOfOutputs.
Exceptions
- DataMinerException
The matrix parameter is not found.
-or-
There is no input with the specified input label.
-or-
There is no output with the specified output label.
MatrixGetIndexFromLabel(string, bool, string)
Gets the index of the input or output that corresponds with the specified input or output label.
note
Please use an overload that takes the parameter ID instead to prevent issues in case the parameter Description changes.
[Obsolete("Use overloads with parameter ID instead of name.")]
public virtual int MatrixGetIndexFromLabel(string parameterName, bool input, string label)
Parameters
parameterNamestringThe name of the matrix parameter.
inputbooltrueif the specified label is an input label; otherwise,false.labelstringThe label of the input (or output in case
inputisfalse).
Returns
- int
The corresponding index.
Examples
var dummy = engine.GetDummy("dummy1");
int index = dummy.MatrixGetIndexFromLabel("Example Matrix", false, "Output 10");
Remarks
The returned index is in the range 1..nrOfInputs or 1..nrOfOutputs.
Exceptions
- DataMinerException
The matrix parameter is not found.
-or-
There is no input with the specified input label.
-or-
There is no output with the specified output label.