How to get every row value from particular column of a table in c# automation script.
Niraj Deval Selected answer as best 6th May 2021
Hi Niraj,
You can do this by getting the table keys first and then requesting the column value for every key.
For example:
public void Run(Engine engine)
{
ScriptDummy myElement = engine.GetDummy("Switch");string[] interfaceKeys = myElement.GetTablePrimaryKeys("Detailed Interface Info Main");
foreach(string key in interfaceKeys)
{
string interfaceMAC = Convert.ToString(myElement.GetParameterByPrimaryKey(50216, key));
}
}
Niraj Deval Selected answer as best 6th May 2021