How to get the updated name after add_block command with MakeNameUnique and with duplicate name ?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Abhijit Chougule
am 20 Feb. 2017
Kommentiert: Abhijit Chougule
am 10 Mär. 2017
If I am adding a block by add_block command with MakeNameUnique as 'On', the command will change the name if it is duplicate. I am using this command in script. My question is, is there any way to know by script the updated new name given by add_block command.
Akzeptierte Antwort
ES
am 10 Mär. 2017
add_block's output will be the handle of the newly added block. From this, the name of the newly inserted block can be found out.
eg;
blockHandle = add_block(gcb, gcb, 'MakeNameUnique', 'on');
get_param(blockHandle , 'Name')
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Model, Block, and Port Callbacks finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!