Main Content

padv.UserSettings Class

Namespace: padv

Build system settings for user

Description

This class requires CI/CD Automation for Simulink Check.

The padv.UserSettings class is a handle class.

Creation

Description

padv.UserSettings is a handle class that you can use to customize the behavior of the build system on your machine. These behaviors impact how the Process Advisor app and runprocess function run tasks on your machine. For example, you can use the user settings to show detailed error messages, remove the process model as a dependency, and customize other behaviors. For more information, see Specify Settings for Process Advisor and Build System.

User settings are persistent and do not reset when you restart MATLAB® or call clear classes. There is only one set of user settings. To get the active user settings object, use the get method.

To specify settings that apply to everyone that uses your project, use padv.ProjectSettings instead.

example

Properties

expand all

Setting that controls whether the build system generates an error message when multiple tasks attempt to write to the same output file, specified as a numeric or logical 1 (true) or 0 (false).

By default, the build system generates an error if multiple tasks attempt to write to the same output file.

This property is equivalent to the Detect duplicate outputs setting in the Process Advisor Settings dialog box.

Example: false

Data Types: logical

Setting for automatically cleaning task results for tasks and artifacts that do not match current process model or project, specified as a numeric or logical 1 (true) or 0 (false).

By default, when you use the build system, the build system cleans task results that are not relevant for the current process model or project. For example, if you had task results from a specific task and then you remove that task from the process model, the build system automatically deletes the task results associated with the task. If you had task results associated with a specific project artifact and then you removed that artifact from the project, the build system automatically deletes the task results associated with the artifact. Note that the build system does not delete generated artifacts like generated code.

If you specify GarbageCollectTaskOutputs as false, the build system does not automatically clean task results associated with tasks and artifacts that are not in the current process model or project.

This property is equivalent to the Garbage collect task outputs setting in the Process Advisor Settings dialog box.

Example: false

Data Types: logical

Setting to show more information in error messages, specified as a numeric or logical 0 (false) or 1 (true).

By default, error messages from the build system are not verbose.

If you specify ShowDetailedErrorMessages as true, the build system shows full stack traces in error messages. You might want to see full stack traces when you are debugging a process model.

This property is equivalent to the Show detailed error messages setting in the Process Advisor Settings dialog box.

Example: true

Data Types: logical

Setting for tracking changes to process model, specified as a numeric or logical 1 (true) or 0 (false).

By default, if you make a change to the process model file, the build system marks each task status and task result as outdated because the tasks in the updated process model might not match the tasks that generated the task results from the previous version of the process model. For example, if you ran the built-in task padv.builtin.task.RunModelStandards with the default Model Advisor configuration, updated the process model to specify a different Model Advisor configuration file for the task, and then ran the task again, the task results are now outdated because they are the task results from the default configuration.

If you specify TrackProcessModel as false and make a change to the process model, the build system will not mark the task statuses and task results as outdated.

This property is equivalent to the Add process model as dependency setting in the Process Advisor Settings dialog box.

Example: false

Data Types: logical

Setting that controls whether the Process Advisor app runs or dry runs tasks by default, specified as either:

  • 0 (false) — Process Advisor shows a run button for each task and the Run All button in the toolstrip.

  • 1 (true) — Process Advisor shows a dry run button for each task and the Dry Run All button in the toolstrip.

You can dry run a task to quickly validate task inputs and generate representative outputs without performing the full task operation. The built-in tasks each have a dryRun method defined to help evaluate the task inputs and outputs for that specific task. Dry runs can be helpful for quickly testing out your process model and CI pipeline. For more information, see Dry Run Tasks to Test Process Model.

Note

This property does not impact the runprocess function. To perform a dry run with the runprocess function, specify the DryRun argument of the function.

This setting is the same as the Run All > Set Dry Run as Default option in the Process Advisor toolstrip.

Example: true

Data Types: logical

Methods

expand all

Examples

collapse all

Get for build system settings for the current user.

PREF = padv.UserSettings.get()

Alternative Functionality

App

In Process Advisor, in the toolstrip, click Settings to access and change the settings for the build system.

Settings button in Process Advisor toolstrip

For more information, see Specify Settings for Process Advisor and Build System.