How to save multiple appdesigner window for inputs and outputs using button
Show older comments
Hi,
I have a app which when run, opens up a window asking the inputs and after run it opens two new windows to show results. How can i save all the windows using button callback?
Please help me with the above one.
8 Comments
Rik
on 26 Jul 2021
What do you mean by saving? Do you want to store a screenshot on the disk? Do you want to save the variables entered to the current instance of your main GUI window? Do you want to persistently save the entered variables so they get loaded the next time you open your GUI?
A button callback is just a function. So you will have to write the function that does what you need.
Harish M Y
on 26 Jul 2021
Yes, I want to save all the window opens when i run the code into the user specified directory.
No need to store variables etc, just to save all the windows in .fig format using the button.
Help me with what to write in the button callback to save all the windows into user specified folder at the end of model execution.
Rik
on 26 Jul 2021
Why did you answer using a different account?
If you just want to save uifigures as .fig files, why not simply use saveas? I justed tested it, and it works for uifigures as well.
Harish M Y
on 26 Jul 2021
My backend code is written in GUIDE. I am creating app using appdesigner. When I call the main model and run using the button, many GUI windows corresponding windows will open which was written in GUIDE. So Once the process for the model is completed, Some graphs and values are displayed on the same GUI from GUIDE. I want to save all those windows in one folder specified by user.
I am unable to go with saveas option.
Please help me with this. If your code is working please share that with me.
Thanks for your help
Rik
on 26 Jul 2021
You need the handles to all windows you want to save. It is that easy. The saveas function does exactly what you describe.
Harish M Y
on 26 Jul 2021
I am not supposed to touch the backend code. So saveas function wont work without handle
Rik
on 26 Jul 2021
You need programmatic access to the figures that are created. One way or another you will need the handles to do that. If you can't get to the handles in any way, what you want is impossible. You don't need to touch the original code, but you will need the handles.
findall(groot) may be helpfull.
Harish M Y
on 26 Jul 2021
Thank you for the inputs. Let me try the same
Answers (0)
Categories
Find more on Printing and Saving in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!