How to replace a simulink block name which is used in many places inside the model?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Sandesh Achari
el 1 de Feb. de 2018
Comentada: Sandesh Achari
el 7 de Feb. de 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 comentarios
Respuesta aceptada
Maverick
el 6 de Feb. de 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
Más respuestas (0)
Ver también
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!