Main Content

createprocess

Create process model

    Description

    processModelPath = createprocess() creates a process model at the project root and returns the path to the created process model. The process model is saved as processmodel.m.

    By default, the function creates a process model using the default process model template. The default template includes several built-in tasks for common model-based design activities. You can only call createprocess if you have a project open.

    This function requires CI/CD Automation for Simulink Check.

    example

    processModelPath = createprocess(Name=Value) specifies the output process model using one or more Name=Value arguments.

    example

    Examples

    collapse all

    Open a project that does not have a process model and use createprocess to create a copy of the default process into the project.

    Open an example project, for example matlab.project.example.timesTable, that does not have a process model.

    Create a process model for the project.

    processModelPath = createprocess
    createprocess copies the default process model into the project root and saves the path to the process model to processModelPath.

    Create a project object for the currently loaded project.

    myProject = currentProject;

    Add the process model file to the current project.

    addFile(myProject,processModelPath)

    Open the Process Advisor app in a standalone window to view the tasks associated with the project and project artifacts.

    processAdvisorWindow

    Open a project and overwrite the process model with an empty process model.

    Open the Process Advisor example project, which contains an example process model.

    processAdvisorExampleStart

    Use createprocess to overwrite the existing process model with an empty process model.

    processModelPath = createprocess(Template="empty",Overwrite=true)

    Open the created process model to view the commented-out example code.

    open(processModelPath)

    Input Arguments

    collapse all

    Name-Value Arguments

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: processModelPath = createprocess(Overwrite=true)

    Name of predefined process model template, specified as either:

    • "default" — Process model file that includes several built-in tasks

    • "empty" — Process model file that contains commented-out example code for adding built-in and custom tasks

    • "parallel" — Process model file designed for parallel CI jobs.

    Example: "empty"

    Data Types: char | string

    Setting to overwrite existing process model, specified as a numeric or logical 0 (false) or 1 (true).

    Example: true

    Data Types: logical

    Set up default process model to group model verification and code verification tasks using subprocesses, specified as a numeric or logical 0 (false) or 1 (true).

    If you specify Subprocess as true, the default process model template contains a subprocess for model verification tasks, "Model Verification", and a subprocess for code verification tasks, "Code Verification".

    Example: true

    Data Types: logical

    Output Arguments

    collapse all

    Path to created process model, returned as a character vector.

    By default, createprocess creates a process model at the project root.

    Alternative Functionality

    App

    If a project does not have a process model, you can use the Process Advisor app to create the default process model. To open the Process Advisor app for a project, in the MATLAB® Command Window, enter:

    processAdvisorWindow

    When you open the Process Advisor app on a project that does not have a process model, the app automatically creates a copy of the default process model at the root of the project.