How do I get the path of all the built-in blocks in the in the Simulink Library so I can programmatically add them to my model?

7 visualizzazioni (ultimi 30 giorni)
How do I get the path of all the built-in blocks in the in the Simulink Library so I can programmatically add them to my model? I am trying to add blocks like in ports and out ports using the command line API and I am not sure how to add built-in blocks with the "add_block" command.

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 3 Mar 2021
Modificato: MathWorks Support Team il 3 Mar 2021
The library that contains all the built-in blocks is simply called simulink.slx, so a command like "find_system('simulink')" will return all the blocks in the Simulink library. From here, it is possible to use "add_block" to add any one of them to a Simulink model. All the options for the "find_system" command can be found at the following documentation link:

Più risposte (0)

Categorie

Scopri di più su Programmatic Model Editing in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by