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: BryanT07
Subject: Re: COM object failed with error
Date: Wed, 20 Jul 2016 06:52:55 -0700 (PDT)

Octave version is: 4.0.3
and
Windows package version is: 1.2.3

-Bryan

On Wed, Jul 20, 2016 at 8:46 AM, PhilipNienhuis [via Octave] <
address@hidden> wrote:

> 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
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://octave.1599824.n4.nabble.com/COM-object-failed-with-error-tp4678684p4678685.html
> To unsubscribe from COM object failed with error, click here
> <http://octave.1599824.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4678684&code=YnJ5YW50ODUwN0BnbWFpbC5jb218NDY3ODY4NHwtMjE3NDg5MjA3>
> .
> NAML
> <http://octave.1599824.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




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



reply via email to

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