Skip to content

appdesigner_export

matlab_compat · scripts/matlab_compat/appdesigner_export.m

: outfile = appdesigner_export (fig, outfile)
: outfile = appdesigner_export (fig, outfile, Name, Value, …)
: outfile = appdesigner_export (code, outfile, "OriginalName", name)

Export a uifigure-based App Designer app to a standalone class-based .m App file (MATLAB R2026a App Designer Export to .m File behaviour).

When fig is a figure/uifigure handle, Nexus generates classdef code that subclasses matlab.apps.AppBase, then writes it through appdesigner.internal.serialization.converter.MLAPPExporter (rename of classdef / help / constructor to the destination basename; error ids MATLAB:appdesigner:appdesigner:InvalidExportFileExtension and MATLAB:appdesigner:appdesigner:NotWritableLocation).

When fig is a character/string code buffer, that text is exported as-is (after the MLAPPExporter rename pass). Use "OriginalName" for the class name embedded in code (default "App").