The Model Diff Tool - MapleSim Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


The Diff Tool

 

Overview

Controls

Locating the Diff Tool

Example: Configuring Perforce for Windows

Overview

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:

• 

.msim

• 

.base_msim

• 

.component

• 

.msimlib

• 

.base_msimlib

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.

Controls

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)

– 

Probe changes

• 

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.

Locating the Diff Tool

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

Default Location

64-bit Windows

difftool.exe

C:\Program Files\Maple <RELEASE>\toolbox\MapleSim\bin.X86_64_WINDOWS

32-bit Windows

difftool.exe

C:\Program Files\Maple <RELEASE>\toolbox\MapleSim\bin.win

Mac

difftool

/Library/Frameworks/Maple.framework/Versions/<RELEASE>/bin

Linux

difftool

/home/<USERNAME>/maple<RELEASE>/bin

 

Notes: 

• 

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.

Example: Configuring Perforce for Windows

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 :

1. 

In Perforce, select Edit > Preferences.

2. 

Select Diff from the navigation menu on the left.

3. 

Click Add....

4. 

Enter msim in the Extension field.

5. 

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).

6. 

 Click Save.

7. 

Repeat steps 3. to 6. for the following extensions:

• 

base_msim

• 

component

• 

msimlib

• 

base_msimlib

To compare two versions of a model, library, or component file:

1. 

In Perforce, browse to the location of the file.

2. 

Right-click on the name of the file and then select Diff Against... .

3. 

Select the versions of the file you want to compare.

4. 

Click Diff.

Once the comparison between the versions you selected is complete, the difference report will open in your browser.

See Also

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

Trademark Attributions