External Interfaces/API |
Saving Your Work
Use these MATLAB functions to save and restore the state of a COM control object.
Function |
Description |
load |
Initialize a COM control object from a file |
save |
Serialize a COM control object to a file |
Save the current state of a COM control to a file using the save
function. The following example creates an mwsamp
control and saves its original state to the file mwsample
:
f = figure('pos', [100 200 200 200]); h = actxcontrol('mwsamp.mwsampctrl.2', [0 0 200 200], f); save(h, 'mwsample')
Now, alter the figure by changing its label and the radius of the circle:
Using the load
function, you can restore the control to its original state:
Identifying Objects | Releasing COM Interfaces and Objects |