The UML Diagram Generator for Microsoft Dynamics 365 is a tool in the XrmToolBox that generates Entity Relationship Diagrams in the form of PlantUML files from metadata in Microsoft Dynamics 365 and the Power Platform Common Data Service.
PlantUML is plain text. This means you can version control your models and you can edit the models by manually editing the PlantUML files.
It is possible to generate visual diagrams from PlantUML ‘code’. Supported formats are PNG, SVG, and even Ascii art text files.
The current version of UML Diagram Generator is not generating the actual visual model, that is handled by the PlantUML service or if you choose to set up your own PlantUML server. There are plans to include the generation, see issue #42 on GitHub.
Using the tool
Start the tool and connect to an environment.
Load entities, and then you can start checking the entities, attributes and relationships you want to include in the model.
Try the Options button, to see how the generated file can be modeled.
When you are happy with the selections and options, hit the Generate button to create the PlantUML file.
Getting started with PlantUML
VS Code extension
The easiest way to get started after installing UML Diagram Generator for Microsoft Dynamics 365 is to install an extension to VS Code and view the files from there. My suggestion is to use the extension by jebbs from the Visual Studio Marketplace.
In VS Code, go to File – Preferences – Settings.
Expand Extensions, and find the PlantUML configuration.
You only need to change/verify two settings: Render and Server:
The rest of the settings can be left with default values.
Now open the generated PlantUML file, and simply right-click and select Preview Current Diagram.
You can also export the diagram as rendered visual files, just right-click and select Export Current Diagram.
This will now prompt you to select which file format to generate. The prompt is popping up at the top of the VS Code window, if you’re not used to VS Code this is not always super clear.
The generated file will by default be placed in a folder under the PlantUML file named as the PlantUML file, and the file name will be the name of the
@startuml tag, which is the same as the Title defined in the options in the tool.
In the above image:
..\CoolRappRockets\Model is the folder where the tool saved the generated file
Cool2 is the name of the generated file
Cool Rapp Rockets is the Title set in the options.
There are also online services generating the model from the PlantUML code, try for example planttext.com where you can past the code from your generated file.
There are lots and lots of options for generating visual models out there, have a look at the PlantUML webpage for a complete list.
|UML||Unified Modelling Language (wikipedia)|
|PlantUML||Open source initiative standardizing textual representation of UML diagrams (wikipedia)|
|ERD||Entity Relationship Diagram (wikipedia)|
|D365||Microsoft Dynamics 365 (or CRM for previous versions also supported)|
|CDS||Common Data Service|
|XrmToolBox||Application with 150+ open source driven tools for the Microsoft Dynamics 365 / CRM / CDS platforms|