Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: COM PutFullMatrix Syntax
Date: Mon, 13 Oct 2008 06:08:06 +0000 (UTC)
Organization: Washington University in St. Louis
Lines: 21
Message-ID: <gcuok6$g6j$1@fred.mathworks.com>
References: <gco63a$pgs$1@fred.mathworks.com> <s412f41pa5p3mrii5mtnbu57uhdk1lr49r@4ax.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1223878086 16595 172.30.248.38 (13 Oct 2008 06:08:06 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 13 Oct 2008 06:08:06 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1547609
Xref: news.mathworks.com comp.soft-sys.matlab:494819


rtServo <noone@nowhere.com> wrote in message ...

rtServo,

I'm running another program (finite element software) as an ActiveX server

sc=actxserver('StressCheck.application');

Like I mentioned, the third parameter is a SafeArray.  I had tried to send it using
object.AddIntersection(1,2,[1,2])

without success prior to asking for help from the developer.  The error message it gives is "??? Error: Type mismatch, argument 3."  The COMApp's developer indicated that it required a safearray and suggested a workaround

object.AddIntersection(1,2,[int32(1),int32(2)])

which appears to work in most cases.  However, it is giving me strange results in other cases.  The only rhyme or reason I can find is that it is usually having problems when the elements in the safearray are the numbers 15 or 5, which doesn't make any sense to me at all.

Thanks for the feedback and I would appreciate any more help you can give me.  The developer of the application I'm using doesn't have experience with MATLAB for COM, as they have only dealt with VB previously.  They're trying to help, but it's taking quite a while.

Thanks
Matt