Hi Dojo,
what is the best way to fill in the IF Interval in table Detailed Interface Info for the whole table and probably over 200 switches. We just want to activate it on all ports.
If someone is interested here is the solution via automation script:
using Skyline.DataMiner.Automation;
namespace CiscoIFInterval
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Text;
using Skyline.DataMiner.Automation;
using Skyline.DataMiner.Net.ReportsAndDashboards;
/// <summary>
/// Represents a DataMiner Automation script.
/// </summary>
public class Script
{
/// <summary>
/// The script entry point.
/// </summary>
/// <param name="engine">Link with SLAutomation process.</param>
public void Run(IEngine engine)
{
try
{
engine.Timeout = TimeSpan.FromMinutes(90);
RunSafe(engine);
}
catch (ScriptAbortException)
{
// Catch normal abort exceptions (engine.ExitFail or engine.ExitSuccess)
throw; // Comment if it should be treated as a normal exit of the script.
}
catch (ScriptForceAbortException)
{
// Catch forced abort exceptions, caused via external maintenance messages.
throw;
}
catch (ScriptTimeoutException)
{
// Catch timeout exceptions for when a script has been running for too long.
throw;
}
catch (InteractiveUserDetachedException)
{
// Catch a user detaching from the interactive script by closing the window.
// Only applicable for interactive scripts, can be removed for non-interactive scripts.
throw;
}
catch (Exception e)
{
engine.ExitFail("Run|Something went wrong: " + e);
}
}
private void RunSafe(IEngine engine)
{
var start = DateTime.Now; // (3) runtime measurement
int changedCount = 0; // (1) count number of changed ports
int errorCount = 0; // (2) count number of errors
Element[] elementsCISCO = engine.FindElementsByProtocol("CISCO Manager", "Production");
var activeElements = (elementsCISCO ?? Array.Empty<Element>())
.Where(x => x != null && x.IsActive)
.ToArray();
int total = activeElements.Length;
engine.GenerateInformation("START CISCO: " + total);
if (total == 0)
{
var durationEmpty = (DateTime.Now - start).TotalSeconds;
engine.GenerateInformation($"END CISCO (no active elements) – Duration: {durationEmpty:F1}s");
return;
}
int processed = 0;
foreach (Element e in activeElements)
{
processed++;
engine.GenerateInformation($"[{processed}/{total}] CISCO Switch: {e.ElementName}");
string[] displayKeys;
string[] primaryKeys;
try
{
displayKeys = e.GetTableDisplayKeys(11000);
primaryKeys = e.GetTablePrimaryKeys(11000);
}
catch (Exception ex)
{
errorCount++;
engine.GenerateInformation($"Error retrieving table keys for {e.ElementName}: {ex.Message}");
continue;
}
if (displayKeys == null || primaryKeys == null || displayKeys.Length == 0)
{
engine.GenerateInformation($"No rows found in table 11000 for {e.ElementName}");
continue;
}
// Map DisplayKey -> PrimaryKey
var keyMap = new Dictionary<string, string>(displayKeys.Length);
for (int idx = 0; idx < displayKeys.Length; idx++)
{
var dk = displayKeys[idx];
var pk = primaryKeys[idx];
if (!string.IsNullOrEmpty(dk) && !string.IsNullOrEmpty(pk))
keyMap[dk] = pk;
}
foreach (string displayKey in displayKeys)
{
if (string.IsNullOrEmpty(displayKey))
continue;
if (!keyMap.TryGetValue(displayKey, out var primaryKey) || string.IsNullOrEmpty(primaryKey))
{
engine.GenerateInformation($"WARN: No PrimaryKey found for '{displayKey}' @ {e.ElementName}");
continue;
}
try
{
var ifType = Convert.ToString(e.GetParameter(11203, displayKey)); // safe read using DisplayKey
if (ifType != "6")
continue; // only apply to ethernetCsmacd
var current = Convert.ToString(e.GetParameter(11274, displayKey)); // safe null/DBNull read
if (current != "5")
{
e.SetParameterByPrimaryKey(11274, primaryKey, 5.0);
changedCount++;
engine.GenerateInformation($"Set 11274=5.0 @ {e.ElementName}, Port '{primaryKey}' (DisplayKey='{displayKey}', previous='{current}')");
// small delay between sets to avoid device overload
System.Threading.Thread.Sleep(100);
}
}
catch (Exception ex)
{
errorCount++;
engine.GenerateInformation($"ERROR setting value @ {e.ElementName}, Row '{displayKey}' (PK='{primaryKey}'): {ex.Message}");
}
}
// optional: process only the first two switches for testing
if (processed >= 2)
break;
}
var duration = (DateTime.Now - start).TotalSeconds; // (3) runtime measurement
engine.GenerateInformation($"END CISCO – {changedCount} ports updated, {errorCount} errors, Duration: {duration:F1}s");
}
}
}

Nice! I was also going to suggest automation for this use case. There is a 'multiple set' window available to set a certain parameter on multiple elements, but with a table you also need to specify the index, so you would need to do this multiple set for each available index… (more info on multiple set: https://docs.dataminer.services/dataminer/Operator_guide/Elements/Working_with_elements/Updating_elements.html#setting-a-parameter-value-in-multiple-elements)