help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: COM object failed with error


From: PhilipNienhuis
Subject: Re: COM object failed with error
Date: Wed, 20 Jul 2016 06:46:10 -0700 (PDT)

BryanT07 wrote
> I have a lot of MATLAB code which runs an API through the COM interface,
> and I am trying to see if I can port the code over into Octave.
> 
> The software I am running through the API is SAP2000, and here is a sample
> code that runs within MATLAB, but will error out in Octave:
> 
> % run only in MATLAB
> if ~isoctave
>     % pass data to Sap2000 as one-dimensional arrays
>     feature('COM_SafeArraySingleDim', 1);
>     % pass non-scalar arrays to Sap2000 API by reference
>     feature('COM_PassSafeArrayByRef', 1);
> end
> % create Sap2000 object
> SapObject = actxserver('Sap2000v15.SapObject');
> % start Sap2000 application
> SapObject.ApplicationStart;
> % create SapModel object
> SapModel = SapObject.SapModel;
> % initialize model
> ret = SapModel.InitializeNewModel;
> % create new blank model
> ret = SapModel.File.NewBlank;
> 
> 
> The command "pkg load windows" is added to the .octaverc file, and it
> looks like it successfully runs the actxserver command. However, I get the
> following error when "SapObject.ApplicationStart" is executed:
> 
> error: com_get: property/method invocation on the COM object failed with
> error `0x8002000e'
> 
> 
> Does anyone know why I am getting this error? 
> 
> The code runs in MATLAB when the two feature() commands are given, and I
> am wondering if I need a similar command in Octave.

What Octave version, what windows package version?

Just type "ver" (w/o quote) in the Octave terminal.

Philip



--
View this message in context: 
http://octave.1599824.n4.nabble.com/COM-object-failed-with-error-tp4678684p4678685.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]