Main Content

Simulink.ModelTransform.BusTransformation.refactor

Replace Bus Selector and Bus Creator blocks with In Bus Element and Out Bus Element blocks

Since R2022b

Description

Simulink.ModelTransform.BusTransformation.refactor(identificationResults) replaces the identified Bus Selector and Bus Creator blocks with the In Bus Element and Out Bus Element blocks in the model.

Examples

collapse all

Replace the Bus Selector and Bus Creator blocks in a model with In Bus Element and Out Bus Element blocks. Open the model VirtualBusPortCreationModel and identify 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}

Replace the identified Bus Selector and Bus Creator blocks with the In Bus Element and Out Bus Element blocks in the VirtualBusPortCreationModel model.

Simulink.ModelTransform.BusTransformation.refactor(identificationResults)

Input Arguments

collapse all

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

Version History

Introduced in R2022b