MATLAB: How to get UIFigure handle

appdesignerhandlesmlapp

I want to check if a UIFigure exist already (then I dont have to open a new one). Ive tried searching with
findobj( 'HandleVisibility', 'off')
But with no luck. How can my script know if a certain .mlapp is already open or not?

Best Answer

Right now, FINDOBJ can only be used to search for something within the App Designer app, so it requires the UIFIGURE handle to be passed in as the first argument:
findobj(h_uifigure, ...)
In order to search for a UIFigure itself, what you can use for now is FINDALL on the root object with whatever PV pairs you're interested in:
findall(0, 'HandleVisibility', 'off')