hello
how can i use the GetElementByNameMessage? i cant find the type to asing on the responde.
GetElementByNameMessage elementVariable = new GetElementByNameMessage();
elementVariable.ElementName = Name;
var responseGetElementy = _dms.SendMessage(elementVariable) as xxxxxxx;
exist a document or manual to uses message?
Thanks
Juan
Hi Juan,
The response is of type ElementInfoEventMessage (when sent via _dms.SendSingleResponseMessage, otherwise the response is DMSMessage[] containing a single ElementInfoEventMessage)
NOTE: SLNet messages are not guaranteed to have a stable API.
Consider using a better supported alternative: IDms.GetElement(string) from the dataminersystem library.
Hi Juan,
In a GQI, you can obtain a reference to IDms within the OnInit Method:
public OnInitOutputArgs OnInit(OnInitInputArgs args)
{
// Initialize the data source
// See: https://aka.dataminer.services/igqioninit-oninit
_dms = args.DMS.GetConnection().GetDms();
}
Thomas
on the public inInit the args.DMS has no contains "Getconnection()" could it be for version of libraries or have to install some one on Nuget?
Hi Juan,
The GetConnection method was added in DataMiner 10.4.6/10.5.0, could it be that you're using an older version of the NuGet?
https://docs.dataminer.services/develop/devguide/GQI_Extensions/API_Reference/GQIDMS.html#iconnection-getconnection
Thanks Tom, i update the Skyline.DataMiner.Files.SLAnalyticsTypes from the Nuget and works ok.
Hi Thomas
How can i define the IDms object in GQI? in protocol i use protocol,GetDms()
Thanks