Data exchange via COM interface

조회 수: 3 (최근 30일)
Vladimir Berezkin
Vladimir Berezkin 2017년 2월 9일
답변: Guillaume 2017년 2월 9일
The task is to organize data exchange between the simulation program IPSEpro and Matlab. I'm trying that:
app = actxserver('PSE.Application');% Start IPSEpro
proj = invoke(app,'openProject','D:\example.pro'); %Call project file
run = invoke(proj, 'runSimulation' ,0); %Run simulation
object = invoke(proj,'findObject','generator001'); %Call the object
temp = invoke(object,'findItem',0,'power'); %Call the parameter of the object
P = invoke(temp,'value'); %Return the value of the parameter
The error:
Error using Interface.PSE_Application.openProject.findObject.findItem/set
Invoke Error: Unknown name or named argument
Error in example (line 9)
P = set(temp,'Value',8);
What can be the problem? Also, I can't get the list of COM object properties and interfaces, because the function get(app) returns an empty value.
  댓글 수: 1
Guillaume
Guillaume 2017년 2월 9일
The line shown in the error message does not match the code you've given.
In any case, without documentation of the COM interface there's little we can do to help you.

댓글을 달려면 로그인하십시오.

채택된 답변

Guillaume
Guillaume 2017년 2월 9일
Without the documentation of the COM interface, there's not much we can do to help. I have seen cases where matlab does not want to show the COM interface with methodsview, properties, etc. In that case, you can use the OLE/COM viewer or the object browser in Visual Studio or in any Office program (under the hidden by default developer tab).

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Use COM Objects in MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by