Problems with accessing external application via COM Object

Dear all,
I'm trying to access an external application, namely AIMMS (www.aimms.com) from MATLAB using a corresponding COM Object.
In general it works. I'm able to create the COM Object, start AIMMS and load the desired AIMMS project. This is the corresponding source code (reduced to the essentials):
% Set up COM Object Server
h = actxserver('AIMMS.Project');
% Load Project
ProjectOpen(h, 'F:\Users\user.name\Documents\ULS_QCP\ULS_QCP.prj');
Now, I want to run a procedure called 'LoadInitialData' within my project in AIMMS. Usually this should be done by:
Run(h, 'LoadInitialData');
Unfortunately, MATLAB always returns the following error message:
??? No method 'Run' with matching signature found for class 'COM.AIMMS_Project'.
Do you guys have any idea what might be causing this? I'm quite confused.
Thanks in advance for your support!
best
Matthias

回答 (2 件)

Fangjun Jiang
Fangjun Jiang 2011 年 11 月 3 日

0 投票

I think it should be invoke(), instead of run().
Guido
Guido 2011 年 11 月 8 日

0 投票

Hi Matthias,
I saw your question pop up and hopefully can provide some more information.
My guess is that the error you are seeing is due to the fact that the Run method actually requires two arguments. The first argument is the name of the procedure that you must run, the second one is a list of arguments for the procedure. I would think you need to provide a null pointer from matlab to the Run method as the second argument.
In our COM documentation on http://www.aimms.com/downloads/other-references-and-guides/com-object, you can find more information about our COM object, including a reference for all of the methods the COM object provides.
If you have any further problems with/questions about AIMMS, I would also like to point out that we have a google group: http://groups.google.com/group/aimms.
Guido Diepen

カテゴリ

ヘルプ センター および File ExchangeUse COM Objects in MATLAB についてさらに検索

製品

質問済み:

2011 年 11 月 3 日

Community Treasure Hunt

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

Start Hunting!

Translated by