appmigration.migrateGUIDEApp
Syntax
Description
Note
This function requires the GUIDE to App Designer Migration Tool for MATLAB.
appmigration.migrateGUIDEApp
launches the GUIDE to App Designer Migration Tool for MATLAB®.
appmigration.migrateGUIDEApp(
migrates
the GUIDE apps in the specified files and folders to App Designer apps as a batch using the
GUIDE to App Designer Migration Tool for MATLAB.files
)
appmigration.migrateGUIDEApp(
additionally specifies options using one or more name-value arguments. For example, you can
specify to migrate apps in subfolders of the files
,Name=Value
)files
path.
Examples
Migrate GUIDE App to App Designer
Suppose you have a GUIDE app that is saved in the
C:\Documents\Apps
folder and consists of two files:
myApp.fig
and myApp.m
. Migrate the GUIDE app to
App Designer using the GUIDE to App Designer Migration Tool for MATLAB, and display the migration progress and summary in the MATLAB Command Window.
appmigration.migrateGUIDEApp("C:\Documents\Apps\myApp.fig")
Identified 1 GUIDE apps to migrate: C:\Documents\Apps\myApp.fig Migrating C:\Documents\Apps\myApp.fig... Success Summary: GUIDE App App Designer App Lines Components Callbacks Issues (Migration Analyzed Created Configured Report) ================================================================================= myApp.fig myApp_App.mlapp 260 14 3 0 Migration Summary: 1 Succeeded, 0 Failed
The migration summary includes links to browse to the location of the original GUIDE app, open the migrated App Designer app, and open the migration report generated by the migration tool.
For more information about the GUIDE to App Designer Migration Tool for MATLAB, see GUIDE Migration Strategies.
Migrate Multiple GUIDE Apps to App Designer
Suppose you have multiple GUIDE apps that are saved in the
C:\Documents\Apps
folder and consist of these files:
A main app,
main.fig
with code filemain.m
A secondary app,
secondary.fig
with code filesecondary.m
Migrate both of the apps in a single command by specifying the folder that the apps are saved in. Display only the migration summary in the MATLAB Command Window.
appmigration.migrateGUIDEApp("C:\Documents\Apps\", ... OutputDetail="summary")
Migrating 2 GUIDE apps... Success Summary: GUIDE App App Designer App Lines Components Callbacks Issues (Migration Analyzed Created Configured Report) ================================================================================================ main.fig main_App.mlapp 270 34 10 0 ------------------------------------------------------------------------------------------------ secondary.fig secondary_App.mlapp 135 7 3 0 Migration Summary: 2 Succeeded, 0 Failed
The appmigration.migrateGUIDEApp
function updates references to
all apps that were successfully migrated using a single command. For example, if
main.m
calls secondary.m
, during migration the
function updates the code in main_App.mlapp
to instead call
secondary_App.mlapp
.
Input Arguments
files
— GUIDE apps to migrate
string array | character vector | cell array of character vectors
GUIDE apps to migrate to App Designer, specified as a string array, character vector, or cell array of character vectors.
Migrate a specific app by specifying the FIG file corresponding to the GUIDE app.
Migrate all apps in a folder by specifying the folder.
Specify files and folders using either a full path or a relative path from your current folder.
Example: "C:/Documents/myApp.fig"
Example: "C:/Documents/Apps"
Example: ["myApp1.fig" "myApp2.fig"]
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: appmigration.migrateGUIDEApp("C:/Documents/Apps",IncludeSubfolders=true)
IncludeSubfolders
— Indicator to migrate apps in subfolders
false
or 0
(default) | true
or 1
Indicator to migrate apps in subfolders, specified as a numeric or logical
1
(true
) or 0
(false
).
When IncludeSubfolders
is 0
(false
), the function ignores subfolders within the specified
files
path.
When IncludeSubfolders
is 1
(true
):
If you specified an app or list of apps to migrate, the function additionally migrates all apps that are contained in subfolders of the folders that contain the specified apps.
If you specified a folder or list of folders with the apps to migrate, the function additionally migrates all apps that are contained in subfolders of those folders.
OutputDetail
— Level of detail of migration progress output
"detailed"
(default) | "summary"
| "none"
Level of detail of the migration progress output, specified as
"detailed"
, "summary"
, or
"none"
. The function displays the migration progress in the
MATLAB Command Window while migrating the apps.
"detailed"
— Display all progress, including which app is currently being migrated, any errors that occur during the migration progress, and a summary of all the apps that succeeded and failed to be migrated."summary"
— Display only a summary of the apps that succeeded and failed to be migrated after the migration completes."none"
— Do not display migration progress or a summary.
Version History
Introduced in R2023aR2023b: Migrating multiple apps updates app references
When you use the appmigration.migrateGUIDEApp
function to migrate
multiple apps at once, the function updates app references. For example, to migrate a main
app that opens a secondary app from GUIDE to App Designer, use the
appmigration.migrateGUIDEApp
function to migrate the main and
secondary apps using a single command. The function replaces all references to the apps that
you migrate together. Therefore, your migrated main app opens the migrated secondary app
without any manual changes to your app code.
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)