code imported from app designer in .m reimported in .mlapp
Show older comments
hello i have a problemme, i developped an app in app designer and to use the code in a docment i copied all the app code into the editor to publish it. but do to unfurtunate events i lost the .mlapp file and only have the .m code so i mean it work i still have the app but i dont know if there is a way to input the code into app designer
Accepted Answer
More Answers (2)
Ruchika Parag
on 26 Jun 2024
Edited: Ruchika Parag
on 26 Jun 2024
0 votes
Hi Jorge,
Currently, there is no way to directly import .m code back into App Designer to recreate the .mlapp file. However, you can manually recreate the UI components and copy the relevant sections of your code into the callbacks and properties of the new App Designer app.
Hi Jorge,
Please refer to this post: https://in.mathworks.com/matlabcentral/answers/2128456-can-we-convert-an-m-file-to-an-mlapp-file-app-designer
Since you have created a .m file from the App Designer, you need to go through the file and manually make the same changes to a new blank app in App Designer.
Steps to Recreate Your App
1. Create a New App:
- Open App Designer and create a new blank app.
2. Recreate UI Components:
- Add UI components (buttons, axes, labels, etc.) to match those in your .m file.
3. Copy and Paste Code:
- Copy callback functions and other relevant code from your .m file into the new app's callbacks and properties.
4. Adjust Properties and Callbacks:
- Ensure the properties and callbacks of UI components match those in the original app.
By following these steps, you can manually recreate your app in App Designer using the .m file as a reference.
Hope this helps!
Categories
Find more on Develop Apps Using App Designer 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!