DiffPlug uses a custom Simulink engine which optimizes for speed and modularity, at the cost of graphical fidelity. This allows us to quickly open Simulink files from anywhere - even inside of git repositories.
Although we are able to interpret and diff every single byte of data in your model, we are not always able to duplicate all of your custom mask code - especially when dealing with library and model reference blocks. To address this shortcoming, we have implemented a Custom masks function, which allows you to create simple rules for putting sensible masks on all of your in-house block libraries.
If you right-click any block in our Simulink viewer, you will see the Custom mask editor option.
This opens up the Mask editor dialog.
You can write scripts which display text, block properties, and line drawings. We don’t have a full M-language interpreter, so the masks have to be pretty simple. Here’s an example which shows what we can do.
% Use disp to print a string constant. disp('SID is') % Use disp with get_param(gcb to print a block property. disp(get_param(gcb, 'SID')) % Use plot to draw lines. plot([0 1], [0 1]) # one bar of an X plot([0 1], [1 0]) # the other bar
All of the masks you create are saved in your preferences. You can export and import these files to easy-to-read XML which you can share with your colleagues.