Hi,
I've run into an issue again.
I'm trying to filter an table based on a few pids so i thought of using QueryData. However i'm getting this error
Script Failure (RSTielineCrud): System.MissingMethodException: Method not found: 'Skyline.DataMiner.Core.DataMinerSystem.Common.IDms Skyline.DataMiner.Core.DataMinerSystem.Automation.IEngineExtensions.GetDms(Skyline.DataMiner.Automation.IEngine)'.
at CManagedAutomation.RunEntryPointWrapped(CManagedAutomation* , Int32 iCookie, IUnknown* pIAutomation, tagVARIANT* varParameters, tagVARIANT* varEntryPoint, tagVARIANT* pvarReturn, String scriptName, tagVARIANT* pvarEntryPointResult)
at CManagedAutomation.Run(CManagedAutomation* , Int32 iCookie, Char* bstrScriptName, IUnknown* pIAutomation, tagVARIANT* varParameters, tagVARIANT* varEntryPoint, tagVARIANT* pvarReturn, tagVARIANT* pvarEntryPointResult) (CSharp; 0x80004005h): (see comment for more details)
So i stripped the script to bare minimum but still i got the error on this script:
namespace RSTielineCrud_100
{
using System;
using System.Collections.Generic;
using System.Linq;
using Skyline.DataMiner.Automation;
using Skyline.DataMiner.Core.DataMinerSystem.Automation;
using Skyline.DataMiner.Core.DataMinerSystem.Common;
using Skyline.DataMiner.Net.Apps.DataMinerObjectModel;
/// <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)
{
engine.GenerateInformation("This script should be run from DOM CRUD");
}
{
try
{
IDms dms = engine.GetDms();
IDmsElement ionVmatrix = dms.GetElement(new DmsElementId(128710, 9));
List<ColumnFilter> sourcefilter = new List<ColumnFilter>
{
new ColumnFilter { Pid = 1602, Value = "ea2f6edd-7637-4b7a-b2a2-05d322f83db9", ComparisonOperator = ComparisonOperator.Equal },
new ColumnFilter { Pid = 1607, Value = "4514", ComparisonOperator = ComparisonOperator.Equal },
};
IEnumerable<object[]> sourceTable = ionVmatrix.GetTable(1600).QueryData(sourcefilter);
engine.GenerateInformation($"RS TEST Found: {sourceTable.Count()}");
}
catch(Exception e)
{
engine.GenerateInformation($"EXEPTION: {e.Message}");
}
}
}
}
As you can see it doesn't throw an exeption it just stops directly. I've loaded the following nugets:
<PackageReference Include="Skyline.DataMiner.Core.DataMinerSystem.Automation" Version="1.1.2.1" />
<PackageReference Include="Skyline.DataMiner.Core.DataMinerSystem.Common" Version="1.1.2.1" />
<PackageReference Include="Skyline.DataMiner.Dev.Automation" Version="10.4.5" />
I don;t get compile errors or validation errors.
Target Version is 10.4.5