programatically exporting the code behind an .mlapp to an m file.
Show older comments
Appdesigner offers a way to export the underlying code out of the binary .mlapp to a .m file with a save as type dialog. This being the only way around storing in git for source control purposes. I want to be able to keep all these export for all the apps housed in a project in a seperate folder, to prevent clutter of the project. While I can maually hit the "export" menuitem , I then have to change the path and repeat indiviually.
Does anyone know if the method behind the menu item is exposed to the matalb command line so that a script could be used to semi automate?
chris
Accepted Answer
More Answers (1)
Duijnhouwer
on 21 Mar 2023
2 votes
You could add this to your MLAPP's startupFnc
writelines(evalc('type(mfilename(''fullpath'')+".mlapp")'),mfilename('fullpath')+".txt");
Each time you run the app, this will export the code as text for easy tracking with GIT.
1 Comment
Xingwang Yong
on 9 Jan 2024
Nice!
Categories
Find more on Debugging and Analysis 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!