How to add a custom library using add_block?

9 visualizzazioni (ultimi 30 giorni)
Sinem Erdogan
Sinem Erdogan il 10 Ott 2019
Commentato: Sinem Erdogan il 11 Ott 2019
Hi, I created a custom library. This library contains only one subsytem block named RADAR. I am trying to use add_block and add this subsytem. Without any error the simulink file opens but the block does not appear. This is how I load my library.
load_system('libdeneme');
And these are some of the code lines I tried.
add_block('simulink/libdeneme/RADAR','autoCreateDeneme')
add_block('simulink/libdeneme/RADAR','autoCreateDeneme')
add_block('libdeneme/RADAR','autoCreateDeneme')
add_block('libdeneme/RADAR',)

Risposte (1)

Fangjun Jiang
Fangjun Jiang il 10 Ott 2019
Your syntax is not correct.
open_system('SourceLibFileName')
add_block('SourceLibFileName/RADAR','DestModelFileName/BlockName')
  5 Commenti
Fangjun Jiang
Fangjun Jiang il 11 Ott 2019
You have an extra character "↵" in the block name in the library, most likely a carriage return. Remove it.
Sinem Erdogan
Sinem Erdogan il 11 Ott 2019
Thank you. This solved the problem.

Accedi per commentare.

Categorie

Scopri di più su Event Functions in Help Center e File Exchange

Prodotti


Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by