Hello, I have a question regarding Visio. Is it possible to query and set the Advanced Editing Shape Data dynamically via an automation or driver (via C#)?
Hi Michael,
An automation script being executed, or a QAction (=C#) from a driver being executed, basically runs on the server. On the server, it's not immediately possible to interact with the advanced editing of the shape data as this is part of the client app Cube... So, I'm afraid this interaction won't be possible.
I'm not sure although what exactly your use-case is... Maybe there are other ways to get to what you're trying to achieve? Feel free to share more details on the problem you're trying to solve, there might be other options?
Bert
Hi Bert,
Thank you for your answer.
Sorry for my late reply.
My question is about being able to set the following long expressions using code:
e.g.
ParameterSummary:Max|166004/351:4023|166004/351:4024|166004/351:4025|166004/351:4035|166004/351:4006|ALARM
My question is also based on the fact that I want to make shape disappear, move, shrink and swap etc. Also the dynamic creation of a new shape based on certain events in the C# source code of the driver. It is clear to me that I can create and hide all shapes in Visio and only unhide them again when I need them.
But would it also be possible to create the shapes as described in the following article?
https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2017/vsto/how-to-programmatically-add-shapes-to-a-visio-document?view=vs- 2017
Would the shapes then also be updated in the Visio of Dataminer?
Best thanks
Michael
Hi Michael,
The Microsoft documentation you are referring to, is to programmatically talk to Visio and add shapes. This cannot be executed outside of Microsoft Visio. So, this is not supported in DataMiner. You could although, e.g. on your computer talk to Visio to programmatically add shapes and populate the shape data (using the documentation you found). Once you’re done, you save the Visio file and then you upload it to DataMiner (web method to upload a Visio file: https://ziine.skyline.be/api/v1/soap.asmx?op=AddVisioFile). Saving and uploading can also be automated, so this could be a fully automated process.
So, you cannot programmatically do this in DataMiner, it’s something your need to do beforehand in Visio, and then you can upload the result to DataMiner.
I hope this way of working makes sense and can be applied to your use case.
Bert