Azzera filtri
Azzera filtri

Share ActiveX control between GUIDE and S-Function

2 visualizzazioni (ultimi 30 giorni)
Hi,
I have an ActiveX control in my GUI, which I would like to control using an S-Function Block (Matlab Level-2).
In my GUI, I assign the ActiveX control to handles.ge, which is available and accessible throughout the GUI.
How can the handles.ge also be available and accessible outside the GUI, in this case S-Function block. I've read about nested function. But, I don't think that could be applied in this case.
Regards, Wan Nawi

Risposta accettata

Kaustubha Govind
Kaustubha Govind il 28 Giu 2011
You could potentially use the block's UserData to share data between the block and another function. See the example on this page. In your GUI, you can use something like:
set_param('path/to/block','UserData',handles.ge);
or
set_param(blockHandle,'UserData',handles.ge);
To set the data.
In the S-function callback methods, you can use:
ge = get_param(block.BlockHandle,'UserData');
To retrieve the data.

Più risposte (0)

Categorie

Scopri di più su Use COM Objects in MATLAB in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by