From: Ralf Stam on
Dear all,

I'm trying to use a set of COM objects in Matlab. I read a
lot of resources (Matworks and others) about it, but can't
get it work. I hope someone is willing to help me!

Some background info: the dlls are supplied with the Tobii
Eyetracker (www.tobii.com) SDK. With the SDK examples are
shown to use the objects in C#, C++ 6.0, and VB6. But as
said, I want to use them in Matlab (R14).

The Visual Basic example for one of he objects is as
follows:
* Add a reference to the TetComponents type library
* Declare and instantiate with:

Dim WithEvents m_tetClient As TetClient
Set m_tetClient = New TetClient

* Now all properties, methods and events are available

I tried this in Matlab:
* h = actxserver('TetComp.TetClient.1')
* h.interfaces gives

ITetCalibAnalyzeDataArray
ITetCalibManager
ITetCalibPlot
ITetCalibProc
ITetClient
ITetPointDArray
ITetTimeUtilities
ITetTrackStatus
_ITetCalibManagerEvents
_ITetCalibPlotEvents
_ITetCalibProcEvents
_ITetClientEvents
_ITetTrackStatusEvents

* h doens't hase other methods/properties than the deaults.
I figured out that the only thing that works is getting the
handle to the ITetClient interface:

ht = h.invoke('ITetClient')

* ht does have the methods I need.
* ht does provide the properties I need.
* but ht.events gives me nothing. So the big question: how
can I access the events?
* In the Matlab mwsamp example, the events are directly
available. So how can I check if this object library is
suitable for Matlab (I'm sure it does have events)?

* What do the underscores mean in the interfaces list?

Another question is: in this library 2 controls with GUIs
are given. I want to include them in my Matlab GUI. How do
I need to treat them / link them to the rest of the
functions?

I have more details about the library, so if you wish I can
post them. Any help or recources will be appreciated!

Thanks,
Ralf
From: Ilya Rozenfeld on
try

invoke(h) -- will provide list of methods
get(h) -- will provide list of properties


"Ralf Stam" <ralf.stam(a)erasmusmc.nl> wrote in message
<g64efr$4s6$1(a)fred.mathworks.com>...
> Dear all,
>
> I'm trying to use a set of COM objects in Matlab. I read
a
> lot of resources (Matworks and others) about it, but
can't
> get it work. I hope someone is willing to help me!
>
> Some background info: the dlls are supplied with the
Tobii
> Eyetracker (www.tobii.com) SDK. With the SDK examples
are
> shown to use the objects in C#, C++ 6.0, and VB6. But as
> said, I want to use them in Matlab (R14).
>
> The Visual Basic example for one of he objects is as
> follows:
> * Add a reference to the TetComponents type library
> * Declare and instantiate with:
>
> Dim WithEvents m_tetClient As TetClient
> Set m_tetClient = New TetClient
>
> * Now all properties, methods and events are available
>
> I tried this in Matlab:
> * h = actxserver('TetComp.TetClient.1')
> * h.interfaces gives
>
> ITetCalibAnalyzeDataArray
> ITetCalibManager
> ITetCalibPlot
> ITetCalibProc
> ITetClient
> ITetPointDArray
> ITetTimeUtilities
> ITetTrackStatus
> _ITetCalibManagerEvents
> _ITetCalibPlotEvents
> _ITetCalibProcEvents
> _ITetClientEvents
> _ITetTrackStatusEvents
>
> * h doens't hase other methods/properties than the
deaults.
> I figured out that the only thing that works is getting
the
> handle to the ITetClient interface:
>
> ht = h.invoke('ITetClient')
>
> * ht does have the methods I need.
> * ht does provide the properties I need.
> * but ht.events gives me nothing. So the big question:
how
> can I access the events?
> * In the Matlab mwsamp example, the events are directly
> available. So how can I check if this object library is
> suitable for Matlab (I'm sure it does have events)?
>
> * What do the underscores mean in the interfaces list?
>
> Another question is: in this library 2 controls with
GUIs
> are given. I want to include them in my Matlab GUI. How
do
> I need to treat them / link them to the rest of the
> functions?
>
> I have more details about the library, so if you wish I
can
> post them. Any help or recources will be appreciated!
>
> Thanks,
> Ralf

From: Ralf Stam on
"Ilya Rozenfeld" <rozeni.nospam(a)alum.rpi.edu> wrote in
message <g64l7f$m4q$1(a)fred.mathworks.com>...
> try
>
> invoke(h) -- will provide list of methods
> get(h) -- will provide list of properties

I already checked this. Methods and properties are oke, but
events are missing.
From: Donn Shull on
Unfortunately MATLAB does not support events from
interfaces. If you look at the documentation long enough
there is a statement to that effect. I wish the MathWorks
would add this functionality.
From: Ralf Stam on
"Donn Shull" <donn.shull.no_spam(a)aetoolbox.com> wrote in
message <g64osi$blk$1(a)fred.mathworks.com>...
> Unfortunately MATLAB does not support events from
> interfaces. If you look at the documentation long enough
> there is a statement to that effect. I wish the MathWorks
> would add this functionality.

Indeed: unfortunately!
Thanks!
 | 
Pages: 1
Prev: MATLAB - MODTRAN
Next: matlabpool error