Main Content

padv.ProjectSettings Class

Namespace: padv

Build system settings for project

Description

This class requires CI/CD Automation for Simulink Check.

The padv.ProjectSettings class is a handle class.

Creation

Description

padv.ProjectSettings is a handle class that you can use to customize the behavior of the build system. These behaviors impact how the Process Advisor app and runprocess function run tasks. For example, you can use the project settings to use incremental builds, enable model caching, and customize other behaviors. For more information, see Specify Settings for Process Advisor and Build System.

Project settings are persistent, are stored in the project, and are shared with everyone using the project. There is only one set of project settings for a project. To get the active project settings object, use the get method.

To specify settings that apply only to your machine, use padv.UserSettings instead.

example

Properties

expand all

Automatically detect changes and mark task results as outdated, specified as either:

  • 1 (true) — When you make a change to an artifact in your project, Process Advisor and the build system mark impacted task results as outdated. Incremental builds can help you reduce the number of task iterations that you need to re-run by identifying and running only the task iterations with outdated results. If the task iteration results are up-to-date, the build system and the Process Advisor app skip the task iteration. In Process Advisor, the task status icons in the Tasks column indicate whether the task results are up-to-date or outdated. Up-to-date task results have task status icons that are green for tasks that pass and red for tasks that fail or generate errors. Outdated task results have task status icons that are gray.

    Process Advisor app with Incremental Build selected

    Note

    There are limitations to the types of changes that the Process Advisor can detect. For more information, see Limitations on Incremental Build.

  • 0 (false) — Process Advisor and the build system do not identify results as up-to-date or outdated, and effectively force run task iterations in the project. In Process Advisor, the task status icons in the Tasks column appear in black and white because the app is not showing which results are up-to-date or outdated. These statuses only indicate whether the task passed, failed, generated an error, or did not run.

    Process Advisor app with Incremental Build check box cleared

This property is equivalent to the Incremental build setting in the Process Advisor Settings dialog box.

Example: true

Data Types: logical

Allow the build system to cache models during a build, specified as a numeric or logical 1 (true) or 0 (false).

If you specify the property EnableModelCaching as true, you allow the build system to cache models instead of reloading the same models multiple times within a build. For more information, see Cache Models and Other Artifacts Used During Build.

This property is equivalent to the Enable model caching setting in the Process Advisor Settings dialog box.

Example: true

Data Types: logical

Maximum number of models in the model cache, specified as a positive value.

For more information, see Cache Models and Other Artifacts Used During Build.

Example: 2

Maximum number of test results in the cache, specified as a positive value.

For more information, see Cache Models and Other Artifacts Used During Build.

Example: 30

Suppress command-line output from Process Advisor during interactive MATLAB® sessions, specified as a numeric or logical 1 (true) or 0 (false).

You can use this setting to suppress command-line outputs from the build system, such as the build log and task execution messages from Process Advisor and the runprocess function.

Note that the build system automatically ignores this setting when you run MATLAB in batch mode, which is typically the case for CI systems.

This property is equivalent to the Suppress outputs to command window setting in the Process Advisor Settings dialog box. If you want to override this setting when you use the function runprocess, you can use the runprocess argument SuppressOutputWhenInteractive.

Example: true

Data Types: logical

Show file extensions for task iteration artifacts, specified as a numeric or logical 1 (true) or 0 (false).

By default, queries strip file extensions from the Alias property of each task iteration artifact. The Alias property controls the display name for the artifact in the Tasks column in Process Advisor.

To show file extensions for all task iteration artifacts in the Tasks column, specify this setting as true. To keep file extensions in the results for a specific query, specify the query property ShowFileExtension as true.

This property is equivalent to the Show file extensions setting in the Process Advisor Settings dialog box.

Example: true

Data Types: logical

Build system behavior when there are untracked I/O files, specified as either:

  • "Allow" — Do not generate warnings or errors for untracked I/O files.

  • "Warn" — Generate a warning if a task has untracked I/O files. In Process Advisor, the I/O column shows a warning icon .

  • "Error" — Generate an error if a task has untracked I/O files.

Note that if you make a change to an untracked file, Process Advisor and the build system do not mark the task as outdated. Make sure that task inputs or outputs that appear as Untracked do not need to be tracked to maintain the task status and result information that you need for your project.

If you change the value of HandleUntrackedIO, the build system uses that behavior the next time you run a task. This property is equivalent to the Untracked dependency behavior setting in the Process Advisor Settings dialog box.

Example: "Allow"

List of filtered digital thread messages, specified as a string.

By default, Process Advisor and the build system do not display certain messages from the digital thread. You can add or remove messages in the list, or reset the list of filtered messages, by using the methods for padv.ProjectSettings. For information, see Filter Messages.

Data Types: string

Detect multiple process model files, specified as either:

  • "Off" — The build system does not generate an error or warning when there are multiple process model files on the project path.

  • "Error" — The build system generates an error when there are multiple process model files on the project path.

  • "Warning" — The build system generates a warning when there are multiple process model files on the project path.

To avoid unexpected behavior, make sure only one processmodel file is on the project path.

Example: "Warning"

Data Types: string

Methods

expand all

Examples

collapse all

Get for build system settings for the currently open project.

PREF = padv.ProjectSettings.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.