help-octave
[Top][All Lists]
Advanced

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

Run Simulation model via COM interface


From: georg_ivanov
Subject: Run Simulation model via COM interface
Date: Thu, 31 May 2018 09:52:26 +0200

Hello Octave professionals
 
I would appreciate your help with the following problem:

I want to run a SimulationX modell via a COM interface with Octave (Ocatve 4.4.0).
I have no problems starting and initializing the simulation programm
(SimulationX) and opening the simulation model with the following code:

% Load package COM interface
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:

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'/


How to run the simulation model?

Thanks so much!
Georg

reply via email to

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