is it possible to reference a port name instead of number for add_line()?

3 visualizaciones (últimos 30 días)
Randy
Randy el 27 de Mzo. de 2014
Respondida: Monika Jaskolka el 24 de Jun. de 2021
The function add_line(), as far as I can tell, requires the use of a port number as part of the origin and destination arguments. If you remove a port from a Simulink model, Simulink automatically renumbers the ports.
This can be a maintenance problem if one were to script the interconnections in a Simulink system, and then need to alter a sub-system.
Is there any way to get add_line() to work with a port name instead of port number?

Respuestas (1)

Monika Jaskolka
Monika Jaskolka el 24 de Jun. de 2021
No, this is not possible. The function add_line can currently only be used by providing the port handles or points.

Categorías

Más información sobre Programmatic Model Editing en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by