Table of Contents

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

pid int

The ID of the matrix parameter.

input bool

true if the specified label is an input label; otherwise, false.

label string

The label of the input (or output in case input is false).

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

parameterName string

The name of the matrix parameter.

input bool

true if the specified label is an input label; otherwise, false.

label string

The label of the input (or output in case input is false).

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.