Main Content

systemcomposer.loadActivity

Load activity diagram model

Since R2026a

    Description

    activity = systemcomposer.loadActivity(activityName) loads the activity model specified by activityName and returns the systemcomposer.activity.Model object. The loaded model is not displayed. The activity model must exist on the MATLAB® path.

    Examples

    collapse all

    Create, save, and load an activity model. Display the model properties.

    adModel = systemcomposer.createActivity('authorActivity');
    save(adModel);
    close(adModel);
    loadedActivity = systemcomposer.loadActivity('authorActivity')
    
    loadedActivity = 
    
      Model with properties:
    
                   Name: 'authorActivity'
         SimulinkHandle: 159.0007
        TypesDictionary: [1×1 systemcomposer.interface.Dictionary]
               Profiles: [0×0 systemcomposer.profile.Profile]
               Activity: [1×1 systemcomposer.activity.Activity]

    Input Arguments

    collapse all

    Name of the activity model, specified as a character vector or string.

    Example: 'authorActivity'

    Data Types: char | string

    Output Arguments

    collapse all

    Activity model, returned as a systemcomposer.activity.Model object.

    More About

    collapse all

    Version History

    Introduced in R2026a