Main Content

simplifyInterfacesWithBusPorts

Update model or subsystem file to use bus element ports for buses

Since R2025a

Description

simplifyInterfacesWithBusPorts(file) updates the model or subsystem file specified by file to use bus element ports for buses at the model and subsystem interfaces. The bus element ports replace input or output ports that connect to Bus Selector or Bus Creator blocks.

The function does not update referenced model interfaces.

example

Examples

collapse all

To simplify your block diagram, replace input port blocks that connect to Bus Selector blocks and output port blocks that connect to Bus Creator blocks. To select bus elements at a model or subsystem interface, use In Bus Element blocks. To group elements into buses at a model or subsystem interface, use Out Bus Element blocks.

Open a model that contains:

  • Bus Selector blocks connected to Inport blocks

  • Bus Creator blocks connected to Outport blocks

To display bus line styles, update the model.

openExample("simulink_features/SimulinkBusCapabilitiesExample")

Navigate to a subsystem that shows Bus Selector and Bus Creator blocks at subsystem interfaces. In this example, navigate to the PortConversion subsystem that displays content previews on two Subsystem blocks. One Subsystem block outputs a bus that the other Subsystem block receives.

open_system("BusCapabilities/PortConversion")

Content previews of subsystems that use Bus Creator and Bus Selector blocks connected to port blocks

Update the model to use bus element ports for buses at the model and subsystem interfaces.

simplifyInterfacesWithBusPorts("BusCapabilities")

Content previews of subsystems that use Out Bus Element and In Bus Element blocks

Input Arguments

collapse all

Model or subsystem file, specified as a filename.

When you specify a filename, omit the file extension.

Example: simplifyInterfacesWithBusPorts("mymodel")

Data Types: double | char | string

Tips

Version History

Introduced in R2025a