DiffPlug can export a report using either the GUI or the command line. You can choose a human-readable format (PDF / DOCX) or a machine-readable format (XML). Each of these options are described below.
Exporting from the GUI
Click the Diff Report button.
This opens the Diff Report dialog.
- View will show the selected report format.
- Export will open a Save as dialog, allowing you to export the report to a specific location.
- Close closes the dialog.
Exporting from the command line
Note: DiffPlug’s command line utility, dp.exe, must be on your system path. DiffPlug installs itself to either “C:\Program Files\DiffPlug” or “C:\Program Files (x86)\DiffPlug”.
The syntax for exporting at the commandline is
dp {left} {right} {reportDestination} [optional Simulink config] --Extra,SimulinkDiffExport[PDF/DOCX/XML]
DiffPlug has the unusual requirement that the reportDestination file must already exist. DiffPlug will automatically overwrite its contents, so it doesn’t matter what is inside, but DiffPlug will not continue unless the file already exists.
Below is an example batch script which ensures that the reportDestination file exists before calling dp.exe.
:: make sure the report file exists
copy NUL report.pdf
:: diff these two files, and export a PDF report
dp v1/simulink/OvenController.slx v2/simulink/OvenController.slx report.pdf --Extra,SimulinkDiffExportPDF
Human-readable report (PDF and DOCX)
The human readable report contains the following sections:
- Setup contains all information necessary to recreate the diff.
- Files describes the root model elements which are being compared.
- Config describes the filtering setup used for the comparison.
- Statistics enumerates the number of additions and changes on each side.
- Changes and Additions is a list of all the changes and additions in the model.
For each changed element, there is a page containing:
- The path to the changed element
- An image of the changed element’s parent diagram, with a highlight on the changed element
- A tree view of the properties of this element which changed
Note: We highly recommend using the table of contents to navigate the report. This makes the report appear animated, because the diagram will remain stationary as the highlighted element moves from page to page.
Machine-readable report (XML)
DiffPlug can also export an easy-to-parse XML file which contains the same content as the human-readable report. The structure of the XML file matches the structure of the human-readable export exactly.