Running a mlapp file from another mlapp file via pushbutton callback

16 vues (au cours des 30 derniers jours)
Jason
Jason le 10 Juil 2023
Commenté : Jason le 10 Juil 2023
Hello, I have a mlapp file and want to run another one from a pushbutton.
Following the link below, I'm able to run my 2nd mapp file (ImageViewer.mlapp) by placing the name of the app in the pushbutton callback
i.e.
function TESTButtonPushed(app, event)
ImageViewer.mlapp
end
However, this requires I put the ImageViewer.mlapp file in the same director as my first mlapp file which I don't want to do. So my question is, how do I run a 2nd mlapp file but thats in a different directory.
Thanks
please note, I don't need to share data, so please dont just share links with how to do this (I have already read them!)

Réponse acceptée

Adam Danz
Adam Danz le 10 Juil 2023
> how do I run a 2nd mlapp file but thats in a different directory?
Add the path to the 2nd app in the button callback or specify the mlapp file using the full path.
function TESTButtonPushed(app, event)
addpath(____)
ImageViewer.mlapp
end
or
function TESTButtonPushed(app, event)
\__fullpath__\ImageViewer.mlapp
end
  3 commentaires
Jason
Jason le 10 Juil 2023
How about if i compile my 2nd mlap file first as an exe. Then that will take care of all the dependencies i assume? so can i just call that exe file within my first mlap file, but have the first file compiled to an exe?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Tags

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by