The Diff Tool
Locating the Diff Tool
Example: Configuring Perforce for Windows
The Diff Tool tool is a separate executable that shows the differences between two versions of a file stored in your revision control system (if your revision control system supports third-party comparison tools). You can use the Diff Tool tool to compare the following file formats:
For more information on these file formats, see Version Controlled MapleSim Model File Format and Version Controlled Library File Format.
The output from the Diff Tool tool is an .html file that opens automatically in your default browser (see the following figure).
The output displays the name and versions of the file below the Controls section.
Differences are shown after the file information and are color coded according to the type of change: addition (green), deletion (red), modification (orange).
For instances where a parameter value has changed, the value on the left is the setting for the first version, and the value on the right is the setting for the second (bottom) version.
The Controls area contains filtering options for the information displayed. Clear an option to hide the changes associated with an option. The following describes the type of information associated with the filters in the Controls area.
Display Annotation changes: Changes made to Modelica annotations in the Modelica source code for the model. These changes include:
Simulation settings changes
Model diagram changes (for example, moving a component)
Display Additions and Removals: Instances of components and shared subsystems that have been added or deleted from the model.
Display Attachment changes: Differences related to files attached to the model or to components.
Display Connection changes: Any changes made to connections between components in the Model workspace. For each connection, the component names and ports affected by the change are given in the connect statement.
Note that some information cannot be filtered. For example, changes to parameters will always appear even when all of the filter options have been cleared.
The name and location of the Diff Tool tool depends on your operating system and architecture. See the following table for the name and default location of the Diff Tool.
Operating System and Architecture
Diff Tool Executable Name
C:\Program Files\Maple <RELEASE>\toolbox\MapleSim\bin.X86_64_WINDOWS
C:\Program Files\Maple <RELEASE>\toolbox\MapleSim\bin.win
In the preceding table, <VERSION> is the major release version of MapleSim (for example, 2016), and <USERNAME> is your user name.
You can run the Diff Tool from the command line to compare by entering the following command:
difftool file1 file2
Where file1 and file2 are the files you want to compare.
This example shows how to configure the Diff Tool tool on a Windows machine running the Perforce Visual Client 2016 November 01. If you are using another revision control system, consult the help for your revision control system on how to configure it for third-party comparison tools.
To configure Perforce to use the Diff tool :
In Perforce, select Edit > Preferences.
Select Diff from the navigation menu on the left.
Enter msim in the Extension field.
Click Browse and then browse to and select difftool.exe.
The default location for difftool.exe is <Maple>\toolbox\MapleSim\bin.<SYS>, where <Maple> is your Maple installation directory and <SYS> is your system platform (for example, X86_64_WINDOWS).
Repeat steps 3. to 6. for the following extensions:
To compare two versions of a model, library, or component file:
In Perforce, browse to the location of the file.
Right-click on the name of the file and then select Diff Against... .
Select the versions of the file you want to compare.
Once the comparison between the versions you selected is complete, the difference report will open in your browser.
Version Controlled MapleSim Model File Format
Version Controlled Library File Format
Adding Components to a Model Using the Search Bar
Compare Models tool: Details
Connecting Components in the Model Workspace
Download Help Document