Simulink Preferences Window: Main Pane

Simulink Preferences Window Overview

The Simulink Preferences Window comprises the following panes:

Click items in the tree to select panes.

Configuration

  1. On the root level pane, select the check boxes to configure preferences.

  2. Close the window to apply your changes.

    Click Apply to apply your changes and keep the window open.

Your settings affect the behavior of all Simulink models, including those currently open, and all subsequent models. Your preference settings are preserved for the next time you use the software.

See Also

Window Reuse

Specify whether to use the current window or open new windows to display a subsystem or its parent.

Settings

Default: Mixed

Mixed

Mixed window reuse. Subsystem opens in its own window. When you press Escape (go to parent), the parent window rises to the front, and the subsystem window disappears.

None

Never reuse windows. Subsystem opens in a new window. Press Escape: the parent window moves to the front.

Replace

Replace parent window. Subsystem opens in a new window. Parent window disappears. Press Escape: the parent window appears, and the subsystem window disappears.

Reuse

Reuse parent window. Subsystem replaces the parent in the current window. Press Escape: the parent window replaces subsystem in current window.

Tips

Command-Line Information

Parameter: WindowReuse
Type: string
Value: 'none' | 'reuse' | 'replace' | 'mixed'
Default: 'mixed'

Model File Change Notification

Use these preferences to specify notifications if the model has changed on disk when you update, simulate, edit or save the model. When updating or simulating, you can choose the action to take: warn, error, reload if unmodified, or show a dialog box where you can choose to reload or ignore. For more information, see Model File Change Notification.

The frame contains these controls:

Updating or simulating the model

Specify whether to notify if the model has changed on disk when updating or simulating the model.

Settings

Default: On

On

Notify if the model has changed on disk when updating or simulating the model. Select the action to take in the Action list.

Off

Do not notify if the model has changed on disk when updating or simulating the model.

Tip

To programmatically check whether the model has changed on disk since it was loaded, use the function slIsFileChangedOnDisk.

Dependency

This parameter enablesAction.

Command-Line Information

Parameter: MDLFileChangedOnDiskChecks
Type: struct, field name: CheckWhenUpdating
Value: true | false | 1 | 0
Default: true

See Also

Model File Change Notification

Action

Select what action to take if the file has changed on disk since it was loaded.

Settings

Default: Warning

Warning

Displays a warning in MATLAB command window

Error

Displays an error, at the MATLAB command window if simulating from the command line, or if simulating from a menu item, in the Simulation Diagnostics window.

Reload model (if unmodified)

Reloads if the model is unmodified. If the model is modified, you see the prompt dialog.

Show prompt dialog

Shows prompt dialog. In the dialog, you can choose to close and reload, or ignore the changes.

Tip

To programmatically check whether the model has changed on disk since it was loaded, use the function slIsFileChangedOnDisk.

Dependencies

This parameter is enabled by the parameter Updating or simulating the model.

Command-Line Information

Parameter: MdlFileChangedOnDiskHandling
Type: string
Value: 'Warning' | 'Error' | 'Reload model (if unmodified)' | 'Show prompt dialog'
Default: 'Warning'

See Also

Model File Change Notification

First editing the model

Specify whether to notify if the file has changed on disk when editing the model.

Settings

Default: On

On

Displays a warning if the file has changed on disk when you modify the block diagram. Any graphical operation that modifies the block diagram (e.g., adding a block) causes a warning dialog to appear. Any command-line operation that causes the block diagram to be modified (e.g., a call to set_param) will result in a warning like this at the command line:

Warning: Block diagram 'mymodel' is being edited but file has 
changed on disk since it was loaded.  You should close and 
reload the block diagram.
Off

Do not check for changes on disk when first editing the model.

Tip

To programmatically check whether the model has changed on disk since it was loaded, use the function slIsFileChangedOnDisk.

Command-Line Information

Parameter: MDLFileChangedOnDiskChecks
Type: struct, field name: CheckWhenEditing
Value: true | false | 1 | 0
Default: true

See Also

Model File Change Notification

Saving the model

Specify whether to notify if the file has changed on disk when saving the model.

Settings

Default: On

On

Notify if the file has changed on disk when you save the model.

Off

Do not check for changes on disk when saving the model.

Tip

To programmatically check whether the model has changed on disk since it was loaded, use the function slIsFileChangedOnDisk.

Command-Line Information

Parameter: MDLFileChangedOnDiskChecks
Type: struct, field name: CheckWhenSaving
Value: true | false | 1 | 0
Default: true

See Also

Model File Change Notification

Autosave

Use this preference to specify whether to automatically save a backup copy of the model before updating or simulating.

For more information, see the check box control Save before updating or simulating the model.

Save before updating or simulating the model

Specify whether to automatically save a backup copy of the model before updating or simulating.

Settings

Default: On

On

If the model has unsaved changes, automatically save a backup copy of the model before updating or simulating. This autosave copy can be useful for crash recovery.

The copy is saved in the same directory as the model, with the name MyModel.mdl.autosave.

Off

Do not automatically save a copy before updating or simulating.

Tips

If you open or load a model with a more recent autosave copy available, the model loads, and the non-modal dialog Model Recovery appears.

For each model in the list, you can choose to:

Select a check box for each model in the list to specify whether to restore, delete autosave, or ignore. You can click the Restore All, Delete All or Ignore All buttons to select that option for all models.

The default option is Ignore All. If you click OK without making any changes, your models and autosave copies are left untouched. The next time you open the model, the Model Recovery dialog will reappear and you can choose again whether to restore or delete any autosave copies.

Click OK to apply your choices.

Autosave has the following rules:

Command-Line Information

Parameter: AutoSaveOptions
Type: struct, field name: SaveOnModelUpdate
Value: true | false | 1 | 0
Default: true

Notify when loading an old model

Specify whether to notify when loading a model last saved in a older version of Simulink software.

Settings

Default: Off

On

Print a message in the command window when loading a model last saved in an old version of Simulink software.

Off

No notification when loading old models.

Tips

Command-Line Information

Parameter: NotifyIfLoadOldModel
Type: string
Value: 'on' | 'off'
Default: off

Do not load models created with a newer version of Simulink

Specify whether to load a model last saved in a newer version of Simulink software.

Settings

Default: Off

On

Do not load any model last saved in a newer version of Simulink software, and print an error message in the command window.

Off

Load models last saved in a newer version of Simulink software, and print a warning message in the command window.

Tip

If possible, use the Save As command to convert the block diagram to the format of the desired version of Simulink software. The Save As command allows you to save a model created with the latest version of the Simulink software in formats used by earlier versions. See Saving a Model in Earlier Formats.

Command-Line Information

Parameter: ErrorIfLoadNewModel
Type: string
Value: 'on' | 'off'
Default: off

Callback tracing

Specify whether to display the model callbacks that Simulink software invokes when simulating a model.

Settings

Default: Off

On

Display the model callbacks in the MATLAB command window as they are invoked.

Callback tracing allows you to determine the callbacks the software invokes, and in what order, when you open or simulate a model.

Off

Do not display model callbacks.

Command-Line Information

Parameter: CallbackTracing
Type: string
Value: 'on' | 'off'
Default: 'off'

Open the Sample Time Legend whenever Sample Time Display is changed

Specify whether to display the Sample Time Legend whenever Sample Time Display is changed.

Settings

Default: On

On

Display the Sample Time Legend whenever you change Sample Time Display by selecting Colors, Annotations, or All from the Sample Time Display submenu. The model diagram is updated and the legend opens.

Off

Do not display the Sample Time Legend whenever Sample Time Display is changed.

Command-Line Information

Parameter: OpenLegendWhenChangingSampleTimeDisplay
Type: string
Value: 'on' | 'off'
Default: 'on'

See Also

Viewing Sample Time Information

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS