Simulink Preferences General Pane

Simulink General Preferences Overview

Set preferences to specify the location for generated file folders and background colors for print or export. You also set these preferences to specify information about Model blocks, callbacks, and sample time legend display.

See Also

Folders for Generated Files

Use these preferences to control the location of model build artifacts. By default, build artifacts are placed in the current working folder (pwd) at the start of a diagram update or code generation. For more information, see:

Simulation cache folder

Specify the root folder in which to put model build artifacts used for simulation and code generation.

Settings

Default:''

Specify a valid folder path. If you do not specify a path, build artifacts are placed in the current working folder (pwd) when you update a diagram.

Tips

  • You can specify an absolute or relative path to the folder. For example:

    • C:\Work\mymodelsimcache and /mywork/mymodelsimcache specify absolute paths.

    • mymodelsimcache is a path relative to the current working folder (pwd). The software converts a relative path to a fully qualified path when you set the preference. For example, if pwd is '/mywork', the result is /mywork/mymodelsimcache.

    • ../test/mymodelsimcache is a path relative to pwd. If pwd is '/mywork', the result is /test/mymodelsimcache.

  • The simulation cache folder is where Simulink® cache files are created. For details about these cache files, see Share Simulink Cache Files for Faster Simulation.

Command-Line Information

Parameter: CacheFolder
Type: character vector
Value: valid folder path
Default: ''

See Also

Code generation folder

Specify the root folder in which to put Simulink Coder™ code generation files.

Settings

Default:''

Specify a valid folder path. If you do not specify a path, build artifacts are placed in the current working folder (pwd) when you start to generate code.

Tip

You can specify an absolute or relative path to the folder. For example:

  • C:\Work\mymodelgencode and /mywork/mymodelgencode specify absolute paths.

  • mymodelgencode is a path relative to the current working folder (pwd). The software converts a relative path to a fully qualified path at the time the preference is set. For example, if pwd is '/mywork', the result is /mywork/mymodelgencode.

  • ../test/mymodelgencode is a path relative to pwd. If pwd is '/mywork', the result is /test/mymodelgencode.

Command-Line Information

Parameter: CodeGenFolder
Type: character vector
Value: valid folder path
Default: ''

See Also

Manage Build Process Folders (Simulink Coder)

Code generation folder structure

Specify structure of generated code folder.

Settings

Default: Model specific

Model specific

Place generated code in subfolders within a model-specific folder.

Target environment subfolder

If you configured models for different target environments, place generated code for each model in a separate subfolder. The name of the subfolder corresponds to the target environment.

Command-Line Information

Parameter: CodeGenFolderStructure
Value: 'ModelSpecific' | 'TargetEnvironmentSubfolder'
Default: 'ModelSpecific'

See Also

Manage Build Process Folders (Simulink Coder)

Background Color

Use these preferences to control the background color for printing, exporting to another format, and models copied to the clipboard for export to another application.

Print

Use a white canvas (background) or the canvas color of the model when printing a model.

Settings

Default: White

White

Use a white canvas.

Match Canvas Color

Match the canvas color of the model.

Command-Line Information

Parameter: PrintBackgroundColorMode
Value: 'White' | 'MatchCanvas'
Default: 'White'

See Also

Share Models

Export

Match the canvas (background) color of the model, use a white canvas, or use a transparent canvas for model files that you export to another file format, such as .png or .jpeg.

Settings

Default: Match Canvas Color

Match Canvas Color

Match the canvas color of the model.

White

Use a white canvas.

Transparent

Use a transparent canvas, so that whatever is behind the canvas is visible.

Command-Line Information

Parameter: ExportBackgroundColorMode
Value: 'White' | 'MatchCanvas' | 'Transparent'
Default: 'MatchCanvas'

See Also

Copy Model Views to Third-Party Applications

Clipboard

Match the canvas (background) color of the model, use a white canvas, or use a transparent canvas for model files that you export to another application.

Settings

Default: Match Canvas Color

Match Canvas Color

Match the canvas color of the model.

White

Use a white canvas.

Transparent

Use a transparent canvas, so that whatever is behind the canvas image shows through.

Command-Line Information

Parameter: ClipboardBackgroundColorMode
Value: 'White' | 'MatchCanvas' | 'Transparent'
Default: MatchCanvas

See Also

Print Models to Image File Formats

Warn when opening Model blocks with Normal Mode Visibility set to off

Show a warning when you open a model from Model blocks that have normal mode visibility set to off.

All instances of a normal mode referenced model are part of the simulation. However, Simulink displays only one instance in a model window. That instance is determined by the normal mode visibility setting. Normal mode visibility includes the display of Scope blocks and data port values. When you open a model from a Model block that has normal mode visibility set to off, the referenced model shows data from the instance of the model has normal mode visibility set to on.

Settings

Default: On

On

After simulation, Simulink displays a warning if you try to open a referenced model from a Model block that has normal mode visibility set to off. Simulink does not open the that instance referenced by the Model block, but instead opens the instance that has normal mode visibility set to on. The instance that has normal mode visibility set to on has different input data sources than the instance referenced by the Model block that you opened.

Off

No warning is displayed if, after simulation, you try to open a referenced model from a Model block that has normal mode visibility set to off.

Tip

The warning that appears includes an option to suppress the display of the warning in the future. Enabling that option sets this preference to off. Use this preference to resume the display of the warning.

See Also

Simulate Multiple Referenced Model Instances in Normal Mode

Show callback tracing

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

Settings

Default: Off

On

Display the model callbacks in the MATLAB® Command Window as they are invoked.

When you open or simulate a model, you can determine the callbacks invoked and their order.

Off

Do not display model callbacks.

Command-Line Information

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

Open the sample time legend when the sample time display is changed

Specify whether to display the sample time legend whenever the sample time display changes.

Settings

Default: On

On

Display the sample time legend whenever you change the sample time display by selecting Colors, Text, or All from the Sample Time section of the Information Overlays menu in the Debug tab of the toolstrip. The model is updated and the legend opens.

Off

Do not display the sample time legend whenever the sample time display changes.

Command-Line Information

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

See Also

View Sample Time Information