How to replace a simulink block name which is used in many places inside the model?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Sandesh Achari
il 1 Feb 2018
Commentato: Sandesh Achari
il 7 Feb 2018
I am using MATLAB 2014b. I want to replace names of the data store memory, data store write, data store read used in my simulink model. Is there any provision to replace just the name of these blocks and not the whole blocks themselves?
I did not find any option for find and replace text in the menu bar or elsewhere. Under Edit menu, the option 'Find & Replaced in Chart' is not accessible. It is really difficult to manually go in all subsystems and replace the names of these blocks.
0 Commenti
Risposta accettata
Maverick
il 6 Feb 2018
Hello
This can be done using a few lines of matlab script. I have done for DataStoreRead blocks, you can extend this logic for other blocks as well. Let us assume that the new name you want to give for all the data store read blocks is 'xyz'
Blk=find_system(bdroot,'FollowLinks','On','LookUnderMasks','all','FindAll','on','BlockType','DataStoreRead')
for i=1:length(Blk)
set(Blk(i),'DataStoreName','xyz')
end
Più risposte (0)
Vedere anche
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!