How to replace a simulink block name which is used in many places inside the model?
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Maverick
2018 年 2 月 6 日
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
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Programmatic Model Editing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!