Main Content

Simulink.ModelTransform.BusTransformation.Result Class

Namespace: Simulink.ModelTransform.BusTransformation

Results of identified Bus Selector and Bus Creator blocks

Since R2022b

Description

Use an object of the Simulink.ModelTransform.BusTransformation.Result class to analyze the identified results of the eligible Bus Selector and Bus Creator blocks in a model.

Creation

Description

The Simulink.ModelTransform.BusTransformation.identify function creates an object of the Simulink.ModelTransform.BusTransformation.Result class when executed. You can use this object as the input argument of the Simulink.ModelTransform.BusTransformation.refactor function.

Note

To avoid errors with model refactoring, do not change the properties of a Simulink.ModelTransform.BusTransformation.Result object.

Properties

expand all

Name of the top model, specified as a character array or string scalar.

List of Bus Selector and Bus Creator blocks, specified as array of Simulink.ModelTransform.BlockInfo objects.

The Simulink.ModelTransform.BlockInfo object has this property:

Path of the bus block in a model, specified as a character vector.

Examples

collapse all

Analyze the results of an eligible Bus Selector and Bus Creator blocks.

Open the model VirtualBusPortCreationModel. Identify the Bus Selector and Bus Creator blocks in the model.

openExample('VirtualBusPortCreationModel')
identificationResults = Simulink.ModelTransform.BusTransformation.identify('VirtualBusPortCreationModel')
identificationResults =

  Results with properties:

          TopModel: 'VirtualBusPortCreationModel'
    BusHierarchies: {4×1 cell}

The results are stored in the Simulink.ModelTransform.BusTransformation.Result object identificationResults.

identificationResults.BusHierarchies
    4×1 cell array

        {1×1 Simulink.ModelTransform.BlockInfo}
        {1×1 Simulink.ModelTransform.BlockInfo}
        {1×1 Simulink.ModelTransform.BlockInfo}
        {1×1 Simulink.ModelTransform.BlockInfo}
hierarchy_1 = identificationResults.BusHierarchies{1} 
hierarchy_1 = 

  BlockInfo with properties:

    Path: 'VirtualBusPortCreationModel/Subsystem2/Bus Selector 2'

Version History

Introduced in R2022b