I have a requirement where I need to read some of the properties of a tag and not just its value. As I expect to have many of these I don’t want to do this:
double min = @Tag.MyTag1.Min; // and others
I can read the value with this:
internal class MyTag
{
public double Value { get; set; }
}
string tagName = @"Tag.MyTag";
MyTag myTag = new MyTag();
TK.CopyTagToNetObject(tagName, myTag, true, true);
But I really want to have this:
internal class MyTag
{
public double Value { get; set; }
public double Min { get; set; }
public double Max { get; set; }
}
The logger messages suggest that the runtime recognises three property names, but doesn’t populate them. So how can I get the Min and Max (and others) at runtime with only the tagname (as a string)?