Hi all,
What is the preferred way of deleting an element from protocol code?
Is this using the NT_DELETE_ELEMENT(5), or is their a direct command for this?
Thank you in advance.
Hi Thibault,
Here is a piece of code that can serve as an example
IDms dms = protocol.GetDms();
var dmsElementID = new DmsElementId("5");
var element = dms.GetElement(dmsElementID);
element.Delete();
For this to work, you need to include this NugetPackage in your QAction : Skyline.DataMiner.Dev.Protocol and use the namespace with
using Skyline.DataMiner.Core.DataMinerSystem.Common;
using Skyline.DataMiner.Core.DataMinerSystem.Protocol;
using Skyline.DataMiner.Scripting;
Kind regards,
Joachim
Note that it’s the “Skyline.DataMiner.Core.DataMinerSystem.Protocol” NuGet that you’ll need for this.