Hi:
I have a button in a mimic shared and used by multiple VIEWs. I can configure the button to trigger an Automation script. And I can use [this view] place holder in the mimic to pass the view name to the script. However, I 'd like to also pass one of the view properties to the automation script. How do I do it?
Thanks
You can retrieve the property of a view using the following code (note that I only added the bare minimum so make sure you also have exception handling in place):
var dms = engine.GetDms();
var viewName = Convert.ToString(engine.GetScriptParam("viewName"));
var view = dms.GetView(viewName);
var viewProperty = view.Properties["propertyName"];
engine.Log("View Property: " + viewProperty);
This makes use of the Class Library as the engine object does not contain methods to retrieve view info. An introduction to using the Class Library can be found in this video.
Thank you very much for the response. I am trying to use the class library in my c# code in my dataminer automation script action. But when i try to using the namespace the automation script gives me error saying Library not exist in Skyline.DataMiner namespace. Seems it need assembly reference. Where could i find the .dll file for this? and how could i import the .dll file?
In my automation script C# code I use:
using Skyline.DataMiner.Library.Common;
using Skyline.DataMiner.Library.Automation;
Thank you very much.