comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Invoking a COM object method, that results in two arrays
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Invoking a COM object method, that results in two arrays [message #61557 is a reply to message #61304] Fri, 18 July 2008 17:52 Go to previous messageGo to previous message
rtowler is currently offline  rtowler
Messages: 28
Registered: June 2006
Junior Member
On Jul 18, 1:54 pm, Karlo Janos wrote:
> rtowler wrote:
>> What are the types of the data in each of the cell arrays?
>
> As far as I know the function results in two "double"-arrays. At least
> both arrays should be of the same type.
>
>> If they are different then there is no way ...
>
> And if they are of the same type? What chance do I have?
>
> If there is no direct possibility to get the result, my last chance
> might be using a wrapper function written in C, that puts the results in
> one single array and can be invoked from IDL. Unfortunately I am not
> experienced in C, so the direct way would be the better one for me.

I'm guessing here, but your method probably returns a 2 element
variant array where each element is a variant containing doubles (in
other words a variant of variants). IDL doesn't handle variants
well. It can handle a variant that contains a single type, but it
cannot handle variants containing mixed types or as in your case
variants containing variants.

I think that you'll need to look at writing a dlm that acts as a
wrapper. If you want to win an award for the most obtuse route you
could use MATLAB's COM server functionality to pass this data to IDL:

ml=obj_new('IDLcomIDispatch$PROGID$matlab.application')
<insert MATLAB commands to invoke your COM client>
null=ml->execute('result=XFLib.The_Function(some, para,meters);')
resultarray1=ml->execute('result{1}')
resultarray2=ml->execute('result{2}')

Of course the data returned to IDL is of type string which you would
have to parse. I'm not saying it's a good idea :) If you decide to
write the DLM, you'll want Ronn Kling's book "Calling C and C++ from
IDL". I've found it indespensible. http://www.kilvarock.com/books/callingCfromIDL.htm

-Rick


N 061 12.39
W 179 47.38
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Displaying degree symbol with Postscript fonts
Next Topic: plot,lat,lon

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 18:41:00 PDT 2025

Total time taken to generate the page: 0.24170 seconds