Hello,
I need to create some views (with assigned visio) by using automation script on a regular base.
Is there an alternative c# method available to use instead of the AssignVisioFileToView webservice?
Thanks,
Hi Peter,
Yes! The C# alternative is `AssignVisualToViewRequestMessage` from the `Skyline.DataMiner.Net.Messages` namespace. Send it via `engine.SendSLNetMessage()` in your Automation script:
using Skyline.DataMiner.Net.Messages;
var msg = new AssignVisualToViewRequestMessage(viewID, "MyVisio.vsdx");
engine.SendSLNetMessage(msg);
This is the proper SLNet message handler equivalent, it internally dispatches via `NotifyType.VdxChangeViews`, the same underlying mechanism as the SOAP webservice, but without the HTTP overhead.
Here is another example I took from an automation script I wrote some time ago:

Hope this helps!