Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

save (COM) - Serialize control object to file

Syntax

h.save('filename')
save(h, 'filename')

Description

h.save('filename') saves the COM control object, h, to the file specified in the string, filename.

save(h, 'filename') is an alternate syntax for the same operation.

Remarks

COM functions are available on Microsoft Windows systems only.

Examples

Create an mwsamp control and save its original state to the file mwsample:

f = figure('position', [100 200 200 200]);
h = actxcontrol('mwsamp.mwsampctrl.2', [0 0 200 200], f);
h.save('mwsample')

Now, alter the figure by changing its label and the radius of the circle:

h.Label = 'Circle';
h.Radius = 50;
h.Redraw;

Using the load function, you can restore the control to its original state:

h.load('mwsample');
h.get

MATLAB displays the original values:

ans = 
     Label: 'Label'
    Radius: 20

See Also

load (COM), actxcontrol, actxserver, release, delete (COM)

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS