[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
run SimulationX model via COM interface
From: |
Fonavi |
Subject: |
run SimulationX model via COM interface |
Date: |
Wed, 30 May 2018 03:05:03 -0700 (MST) |
Hello to all professional Octave users
I would appreciate your help with the following problem:
I want to run a SimulationX modell via a COM interface with Octave.
I have no problems starting and initializing the simulation programm
(SimulationX) and opening the simulation model with the following code:
/% Load package
pkg load windows
% Start of SimulationX
sim = actxserver('iti.simx37');
sim.Visible = true;
% Wait till SimulationX is initialized
if strcmp(sim.InitState, 'simUninitialized')
while ~strcmp(sim.InitState, 'simInitBase')
pause(0.1);
end
end
% Load libraries
if strcmp(sim.InitState, 'simInitBase')
sim.InitSimEnvironment()
end
% Open document/ model
doc = sim.Documents.Open('P:\Folder\Model.isx');/
Then I try to run the simulation with the following code:
/doc.Reset;
doc.Start;
while ~strcmp(doc.SolutionState, 'simStopped')
pause(0.1)
end/
and recieve this error message from Octave:
/error: com_get: property/method invocation on the COM object failed with
error `0x80020003'/
Can you help me out with the correct code for running the simulation model?
Thanks in advance
Georg
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- run SimulationX model via COM interface,
Fonavi <=