Main Content

padv.util.MbtHelper Class

Namespace: padv.util

Find input and output files for MATLAB build tasks

Since R2023b

Description

This class requires CI/CD Automation for Simulink Check.

Starting in R2023b, the padv.builtin.task.RunBuildTool class provides a task that can execute specific tasks in a MATLAB® build tool plan. The RunBuildTool class and related queries use the methods of the padv.util.MbtHelper class to find the input and output files for MATLAB build tasks. With the MATLAB build tool, you can create a build plan that identifies code issues, runs tests, and performs other operations. For more information on the MATLAB build tool, see Build Automation.

Methods

expand all

Examples

collapse all

You can get input files and output files for MATLAB build tool tasks by using the methods of the padv.util.MbtHelper class.

% Create a plan with no tasks
plan = buildplan;

% Create build tool tasks
plan("task1") = matlab.buildtool.Task(Actions=@(~) disp('Action1'));
plan("task2") = matlab.buildtool.Task(Actions=@(~) disp('Action2'));

% Assume task1 and task2 have inputList with valid FileCollection objects
tasks = plan.Tasks;

% Get input files
inputFiles = padv.util.MbtHelper.getInputFilesForTasks(tasks)

% Get output files
outputFiles = padv.util.MbtHelper.getOutputFilesForTasks(tasks)

In this case, these example tasks do not have input files or output files, so the methods return empty string arrays.

Version History

Introduced in R2023b