We want to trigger an automation built in Dataminer via API but get an error code 12 as response.
This is from the Automation logs:
2025/09/02 09:42:13.013|SLAutomation.exe 10.5.2443.11256|35268|22884|CScriptRunInfo::CheckElementStates|DBG|-1|(Script IRD 24 IP GEO Television HD Main VLAN301) Could not start script: no element linked to dummy id 2 (sawd-dist3)
2025/09/02 09:42:13.013|SLAutomation.exe 10.5.2443.11256|35268|22884|CScriptLoader::StartScript|DBG|-1|Script execution could not be started (IRD 24 IP GEO TELEVISION HD MAIN VLAN301)
**********
The script works when using the “Execute” button in Dataminer and also when integrated in Visio.
I also tried another script. There, we also get the message “no element linked to dummy XXX.”
Best regards, Felix
Does the script require the input of an element that you try to change?
Ah yes, it takes an scripts dummy:
ScriptDummy dummyArista = engine.GetDummy("sawd-dist3");
That one does not get set through by calling the script through the api route.
Hi Gerwin, if i understand it correctly we do not add input parameters to the script. Everything is fix.
Here is an export of the Code for the Automation. Is there something im missing ?
<DMSScript options="272" xmlns="http://www.skyline.be/automation">
<Name>IRD 24 IP GEO Television HD Main VLAN301</Name>
<Description>
</Description>
<Type>Automation</Type>
<Author>XXXX</Author>
<CheckSets>FALSE</CheckSets>
<Folder>IRD 24/IP-Kabelmux/Bedrock VLAN 301 404</Folder>
<Protocols>
<Protocol id="2">
<Description>sawd-dist3</Description>
<Name>Arista Manager</Name>
<Version>Production</Version>
<DefaultElement>191301/256</DefaultElement>
</Protocol>
<Protocol id="1">
<Description>IRD24</Description>
<Name>CISCO D9800</Name>
<Version>Production</Version>
<DefaultElement>191301/257</DefaultElement>
</Protocol>
</Protocols>
<Memory>
</Memory>
<Parameters>
</Parameters>
<Script>
<Exe id="2" type="csharp">
<Value><![CDATA[// Find the script dummy
ScriptDummy dummyArista = engine.GetDummy("sawd-dist3");
// Define the command to configure the interface and VLAN
string cmd1 = "interface Ethernet46;switchport access vlan 301;";
// Kopiert den string in das Commands Feld im Explorer
dummyArista.SetParameter("Commands", cmd1);
// Drückt den Submit Knopf im Explorer
dummyArista.SetParameter(6010, 1);]]></Value>
<Message>
</Message>
</Exe>
<Exe id="3" type="set">
<Param protocol="1">6055:1/1/1</Param>
<Value>239.XXX.XX.XX</Value>
</Exe>
<Exe id="4" type="set">
<Param protocol="1">6056:1/1/1</Param>
<Value>1XXXX</Value>
</Exe>
<Exe id="5" type="set">
<Param protocol="1">6051:1/1/1</Param>
<Value>Yes</Value>
</Exe>
<Exe id="6" type="set">
<Param protocol="1">6061:1/1/1</Param>
<Value>Data1</Value>
</Exe>
</Script>
</DMSScript>
Best regards Felix