Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Registering Customizations

About Registering Customizations in Simulink

Register your customizations using the MATLAB® function sl_customization.m. Place the function on the MATLAB path of the Simulink® installation that you want to customize or in the current folder.

You can have more than one sl_customization.m file. The customizations in each file takes effect, with conflicts handled by each customization. For example, if you specify priorities for libraries in multiple sl_customization files, only one takes effect. If you add the same menu item twice, it appears twice. To ensure that customizations are loading as expected, refresh the customizations, as described in Reading and Refreshing the Customization File.

The sl_customization function accepts one argument: a handle to the customization manager object, that is, cm. For example:

function sl_customization(cm)

In your sl_customization function, use customization manager object properties and methods specific to your application to register customizations. You can use customization properties and methods to:

Additional MathWorks® products use the customization manager object and the sl_customization.m file. Refer to your product documentation to learn about the methods and properties that apply to your product.

Reading and Refreshing the Customization File

The sl_customization.m file is read when Simulink starts. If you change the sl_customization.m file, either restart Simulink or enter this command to see the changes:

sl_refresh_customizations

This command runs all sl_customization.m files on the MATLAB path and in the current folder. Some side-effects of running sl_refresh_customizations include:

  • Rebuilding all Simulink Editor menus and toolbars

  • Rebuilding the Library Browser menus and toolbars

  • Clearing the Library Browser cache and refreshing the Library Browser

  • Reloading the Signal and Scope Manager data

Related Topics

Was this topic helpful?