Hi. I need to get on an automation script, the name of this automation script.
Doing this, I could do a generic code to send me an email that indicated this script haven't work.
kind regards
Hi Henri,
Since DMA version 10.5.6, the Engine class contains a private field _scriptName, but unfortunately this isn’t publicly exposed. With reflection however, it’s possible to retrieve the value:
var scriptNameField = typeof(Engine).GetField("_scriptName", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
var scriptName = scriptNameField.GetValue(engine) as string;engine.GenerateInformation("Script name: " + scriptName);
Important note:
While this works, it is of course a bit of a workaround and should be used with care. There is no guarantee that this will keep working in future DataMiner versions.
As Jorge already mentioned, you could also submit a new feature suggestion.