Main Content

Simulink.ModelTransform.BusTransformation.identify

Identify Bus Selector and Bus Creator blocks to transform

Since R2022b

Description

identificationResults = Simulink.ModelTransform.BusTransformation.identify(model) returns the Bus Selector and Bus Creator blocks present in the model. To simplify the model, use In Bus Element and Out Bus Element blocks instead of Bus Selector blocks for inputs and Bus Creator blocks for outputs.

Examples

collapse all

Search a model for eligible Bus Selector and Bus Creator blocks and store the results.

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

  Results with properties:

          TopModel: 'VirtualBusPortCreationModel'
    BusHierarchies: {4×1 cell}
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'

Input Arguments

collapse all

Model name, specified as a character vector or string scalar.

Output Arguments

collapse all

Identified Bus Selector and Bus Creator blocks that can be transformed to In Bus Element and Out Bus Element blocks, returned as a Simulink.ModelTransform.BusTransformation.Result object.

Version History

Introduced in R2022b