Hi, We embedded IronPython to allow users to specify custom KPIs to be calculated from plant-floor measurements. It's woking nicely. The user selects which measurements she wants, provides aliases to these and they get exposed to the expression scope as variables.
But we have two kinds of users: 1) People that only need the value of the measurements; they would like the variable to be the measurement value, so they could write short expressions like: a + b * 0.2 2) People that want more advanced scenarios, and need more attributes of the measurement (for example, the timestamp of the data acquisition and its quality). For example: (b.Value - a.Value) / (b.SourceTimestamp - a.SourceTimestamp).TotalMilliseconds Is there a way to satisfy both scenarios? So that the object could also be evaluated implicitly as a float? My first thought was to use a coercion, but the documentation does not recommend it. Any other suggestions please? Thank you so much for the attention. Best regards! Mello
_______________________________________________ Ironpython-users mailing list Ironpython-users@python.org http://mail.python.org/mailman/listinfo/ironpython-users