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.
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:
Specify the root folder in which to put model build artifacts used for simulation and code generation.
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.
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.
Parameter:
CacheFolder |
Type: character vector |
Value: valid folder path |
Default:
'' |
Specify the root folder in which to put Simulink Coder™ code generation files.
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.
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
.
Parameter:
CodeGenFolder |
Type: character vector |
Value: valid folder path |
Default:
'' |
Manage Build Process Folders (Simulink Coder)
Specify structure of generated code folder.
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.
Parameter:
CodeGenFolderStructure |
Value:
'ModelSpecific' |
'TargetEnvironmentSubfolder' |
Default:
'ModelSpecific' |
Manage Build Process Folders (Simulink Coder)
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.
Use a white canvas (background) or the canvas color of the model when printing a model.
Default:
White
White
Use a white canvas.
Match Canvas Color
Match the canvas color of the model.
Parameter:
PrintBackgroundColorMode |
Value:
'White' | 'MatchCanvas' |
Default:
'White' |
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
.
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.
Parameter:
ExportBackgroundColorMode |
Value:
'White' | 'MatchCanvas' |
'Transparent' |
Default:
'MatchCanvas' |
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.
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.
Parameter:
ClipboardBackgroundColorMode |
Value:
'White' | 'MatchCanvas' |
'Transparent' |
Default:
MatchCanvas |
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.
Default: 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.
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.
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.
Specify whether to display the model callbacks that Simulink invokes when simulating a model.
Default: Off
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.
Do not display model callbacks.
Parameter:
CallbackTracing |
Value:
'on' | 'off' |
Default:
'off' |
Specify whether to display the sample time legend whenever the sample time display changes.
Default: 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.
Do not display the sample time legend whenever the sample time display changes.
Parameter:
OpenLegendWhenChangingSampleTimeDisplay |
Value:
'on' | 'off' |
Default:
'on' |