23

I've started playing around with DGML for visualizing directed graphs based on some manufauctring process flow data. It works slicker than proverbial snot and is quite easy to generate.

The only problem is that the only DGML viewer I can find is VS.NET 2010. It appears that the viewer is built on MSAGL, but even that doesn't appear to support DGML directly.

Does a standalone DGML viewer exist? Preferably as an embeddable component. Even more preferably as WPF.

Chris Charabaruk
  • 4,267
  • 2
  • 26
  • 57
dkackman
  • 14,361
  • 11
  • 63
  • 118
  • My google fu did not show up anything useful. But DGML looks eerily like the dot language. The only thing that comes to mind writing a small converter. The mapping seems quite simple. Might not work if you want the custom properties, but you have have some links (ref="xx") on dot nodes. – Derick Schoonbee Mar 26 '11 at 09:23
  • good idea. been thinking along those lines. looks like im gonna have to figure out graphviz. – dkackman Mar 26 '11 at 12:49

5 Answers5

48

The DGML Editor was not available in Visual Studio 2017 by default so I could not see DGML files visually and only saw them in the xml format. I had to fix this by explicitly installing the DGML editor. Please install it as such: (Tools > Get tools and features... > Individual Component > Code tools > DGML Editor)

Ayushmati
  • 922
  • 8
  • 10
  • 3
    This helped me find what I was looking for. – Rojan Gh. Jun 14 '19 at 14:01
  • 1
    Yeah I definitely found what I was looking for. – Frank Apr 29 '20 at 19:36
  • Slightly off-topic, but how do you view the XML "code" of the DGML file and simultaneously view the graphical representation of the same DGML file. As far as I can get it working, VS 2019 allows me to only open one at a time. – user3004449 Jun 14 '20 at 19:22
28

I encourage you to submit a request by selecting Suggest a feature on this page as further support for a standalone DGML viewer. It might help persuade the product team that there's enough of a demand for one.

Esther Fan - MSFT
  • 7,908
  • 4
  • 25
  • 25
  • 1
    http://connect.microsoft.com/VisualStudio/feedback/details/654963/create-standalone-dgml-viewer-application-and-or-component – dkackman Mar 31 '11 at 00:38
  • 1
    https://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/3418282-provide-dgml-standalone-viewer-to-be-used-e-g-wi – Davi Fiamenghi Jan 18 '16 at 16:10
  • You can suggest a feature for Visual Studio here: https://developercommunity.visualstudio.com/spaces/8/index.html – Esther Fan - MSFT May 12 '20 at 19:03
13

There is a DGML Viewer in Visual Studio 2019. You can install it via Visual Studio Installer. Just open Visual Studio Installer, click on Modify, select Individual Components, Code Tools, DGML Editor. To create the DGML files from a DbContext on an EF Core application, you can use EF Core Power Tools. The image below is from a DGML generated by EF Core Power Tools and viewed using DGML Editor. I hope it helps.

enter image description here

4

The DgmlPowerTools Visual Studio 2012 package gives you the option to export DGML to SVG:

https://visualstudiogallery.msdn.microsoft.com/46b71f5f-a4d5-4867-9d50-0416f7aefe28

Alternatively, I'm pretty sure given a few free weekends it would be easy to knock up something to convert DGML to HTML (e.g. using HTML5 Canvas to display, or one of the many graphing libraries such as D3.js)...

JohnLBevan
  • 18,988
  • 5
  • 75
  • 151
1

Take a look at Graphviz DOT. It can generate many different graphical output formats including PNG, JPG, PDF, SVG. It uses syntax similar to DGML.

https://www.graphviz.org/

Robert Bratton
  • 303
  • 1
  • 4
  • 12