This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Run a Project Custom Task and Publish Report

  1. In a project, click Custom Tasks, and then select the check boxes of project files you want to include in the custom task.

    Tip

    If the function can identify the files to operate on, include all files. For example, the custom task function saveModelFiles in the airframe project checks that the file is a Simulink® model and does nothing if it is not.

    To select multiple files, Shift or Ctrl+click, and then right-click a file and select Include or Exclude.

  2. Specify the custom task function to run in the Custom task box. Enter the name, or click Browse, or choose from a list of custom tasks.

    If your project does not yet contain any custom task functions, see Create a Custom Task Function.

  3. Click Run Task.

    The project displays the results.

  4. To view details of results for the currently selected file, click a file and check the Results pane.

You can publish a report of your custom task results. For example, try this custom task:

  1. Open an example project by entering sldemo_slproject_customtasks.

  2. In a Project, click Custom Tasks.

  3. In the Custom Task dialog box, click the Custom task drop-down arrow to choose from a list of tasks, and select Generate Bill of Materials Report.

  4. Click Run Task. Results appear.

  5. Click Publish Report.

  6. In the file browser, specify a name and location for the report, and choose a file type from HTML or Microsoft® Word. If you have MATLAB® Report Generator™, you can also choose PDF.

  7. View the results in the report.

    The example custom task function Generate Bill of Materials Report creates a list of project files, their source control status, revision numbers, and MD5 checksums. You can view the code for this custom task in the file billOfMaterials.m.

  8. To see the report file and add it to your project, switch to the All files view.

Tip

To try example custom tasks in a project, see the example Running Custom Tasks with a Project.

Related Topics