Automating Visio dashboards

With powershell I have managed to automate the creation of SVG files for the purpose of making dashboards. I have also reviewed the videos of modifying JSON with powershell. I’m now wondering if there is any way to automate creation of the dashboards all together. It seems like I would just need to know where to put the SVG files, if it matters, in order to point the JSON at them.
On a similar note if there were a way to also publish them from powershell to complete the automation it would also be useful.

1 Like

Publishing is just moving the draft from one folder on disk (each user has a draft directory in …\Squaredupv4\User\Packages) to the everyone pack (…\Squaredupv4\User\Packages\Everyone\Dashboards). Copying the SVG to the correct location, then enter the details into the json, and save the file to the correct folder.

Should be relatively straightforward to complete your automation :slight_smile:

I don’t suppose that your SVG automation is on Github? Would be great to see/use!

1 Like

I will clean it up a bit and add in some comments then see about getting it up to GitHub. My main use case is for identical SVG which just reference different SCOM groups. We have multiple locations which have a virtualization host and 3 VM servers, We created a group for each location and a dashboard for each. Any time server names change I can simply regenerate all SVGs.

I also have one for a slightly more dynamic use.
I’ll let you know when it’s available.

As far as publishing, that sounds familiar thanks for the refresher on that. I guess the SVG just has to be placed here (…\User\Packages\Uploads\Resources) and hopefully “path”: “res/Uploads/…” is referencing that location. I’ll give it a try.

That would be awesome :slight_smile: Yup - That looks correct. Let me know if you have any issues, I’m happy to help!

That seems to work. The only caveat is that the SVG seems to require a unique name every time, hence the timestamp it is given on import I suppose. Which is slightly disappointing but doable.

Excellent - Glad I could help :slight_smile:

what seemed to be working in version 3 does not seem to in version 4. There seems to be something the Visio import is doing which I am not seeing. It seems any SVG file which I try to manually copy to where the site would place it fails to load. As soon as I point it back to one ingested through the site itself, it will load.

This is great, I’d love to see that automation too. We have multiple implementations of applications so i’m going to be replicating SVG up to four times per app, anything to speed that process up would be amazing! :slight_smile:

So it turns out, and special thanks to Casey from support, the missing item was merely recycling the app pool after placing the SVG file. Now to finish cleaning up the script and getting it uploaded for you guys and gals. :slight_smile:

Cholden - Are you able to share this? I’ve had a project land on my desk which this would be great for!