I looked into the documentation, but it's not clear how to retrieve an instance using a guid as an input.
Next I'd also like to retrieve a field value from that instance object.
I already have a DomHelper object. So far so good.
Any ideas on how to go about the rest?
Hi Jeroen,
Let me quickly give you few pseudo code snippets (C# blocks):
GET DOM INSTANCE
// Retrieve the DomInstance var helper = new DomHelper(engine.SendSLNetMessages, "MODULE ID"); var filter = DomInstanceExposers.Id.Equal(<DOM INSTANCE ID>); var domInstance = helper.DomInstances.Read(filter).FirstOrDefault();
GET FIELD OF DOM INSTANCE (follow up on code block above)
var instanceField = domInstance.Sections?.FirstOrDefault().GetFieldValueById(< DOM DESCRIPTOR ID >); object instanceValue = instanceField?.Value.Value;
Note: I assume it is better to for-loop the sections list.
Documentation: Altering values of a DomInstance - examples | DataMiner Docs
Hope this helps you further