This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

load

Initialize COM control object from file

Syntax

load(c,filename)

Description

example

load(c,filename) initializes the COM object associated with the interface represented by the MATLAB® COM object c from the file specified by filename. The file must have been created previously by serializing an instance of the same control.

COM functions are available on Microsoft® Windows® systems only.

Examples

collapse all

Save settings for an mwsamp control, modify the settings, then restore the original values.

Create the 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);
save(h,'mwsample')

Alter the figure by changing its label and the radius of the circle.

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

Restore the control to its original state using the load function.

load(h,'mwsample')
get(h)
ans = 
     Label: 'Label'
    Radius: 20

Input Arguments

collapse all

COM object, specified as a function handle.

File name, specified as a character vector.

Introduced before R2006a