Hey MATLABers,
is there any way to change the current block in Simulink, which will be returned by gcb/gcbh? I would like to start GUIs programmatically, but their code relies on gcb (works perfectly, as long as you start a GUI by double-clickling).
Unfortunately, the following code does not make a block the current block:
>> set_param(hBlock,'Selected','on');>> isequal(hBlock,gcbh)ans = 0
Other possibility: programmatically trigger a mouse-click on a Simulink block, but I don't know how…
Thanks very much and best regards
Thomas
Best Answer