How to get the handle of simulink window in matlab

7 visualizzazioni (ultimi 30 giorni)
QiQin Zhan
QiQin Zhan il 19 Mar 2015
Commentato: Jan il 6 Feb 2022
I want to embed the simulation result of simMechanics into my self-created GUI. So I think the first thing I should do is to get the handle of simMechanics window. I know there must be some way to get it.But how? Any suggestion would be appreciated.

Risposte (1)

Al Dente
Al Dente il 2 Apr 2015
you can try using findall(0) -- root matlab handle, then looping over all the handles to find the right handle. What I wanted to do in my application is to search for an open Signal Builder window so I did this:
hndls = findall(0);
Tags = arrayfun(@(x)get(x, 'Tag'), hndls, 'UniformOutput', 0);
sigbuilderwin = hndls(strcmp(Tags, 'SignalBuilderGUI'));
Hope this helps

Categorie

Scopri di più su Event Functions in Help Center e File Exchange

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by