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.

Automate Shutdown Tasks with Shortcuts

In Simulink® Project, shutdown shortcuts help you clean up the environment for the current project when you close it. Shutdown shortcuts should undo the settings applied in startup shortcuts. You can view an example in the sldemo_slproject_airframe project.

Configure an existing file as a shortcut to run when you close your project.

  1. Right-click the file in the Project Files View and select Add Shortcut to > General, or if you have created a shortcut group you want to use, then select Add Shortcut to > GroupName. You can change shortcut group later.

  2. Click the Shortcut Management node.

  3. Right-click the shortcut file and select Set Shortcut Action > Shutdown.

    The Action column displays Run at Shutdown.

Create a new shutdown shortcut file.

  1. In the Shortcut Management view, click Create Action Shortcut > Shutdown Script.

  2. Name and save the file.

    The tool adds the new file to the project and sets it to Run at Shutdown.

  3. Right-click the file and select Open.

  4. Write the shortcut script using the Editor.

  5. Click Save.

    Note:   Shortcuts are included when you commit modified files to source control. Any shutdown shortcuts you create run for all other project users.

To stop a shortcut running at shutdown, change back to a basic shortcut using Set Shortcut Action > None.

Related Examples

More About

Was this topic helpful?