Error using invoke method to execute script (in Catia)

4 ビュー (過去 30 日間)
AFB1982
AFB1982 2018 年 11 月 20 日
編集済み: AFB1982 2018 年 11 月 20 日
I am trying to run a script created in Catia, in the VB language, using the invoke command in Matlab, however this results in an error. The original commands in VB (which run correctly) are:
Sub CATMain
Dim params()
CATIA.SystemService.ExecuteScript "C:\Users\ABCXYZ\Documents\MATLAB\TestCase\VirtGage", 1, "GetAxis.CATvbs", "CATMain", params
End Sub
The equivalent Matlab method however does not work. It is written as follows:
catia = actxserver('catia.application');
feature('COM_SafeArraySingleDim', 1);
params = {};
SystemService=get(catia,'SystemService');
invoke(SystemService,'ExecuteScript','C:\Users\ABCXYZ\Documents\MATLAB\TestCase\VirtGage',1,'GetAxis.CATvbs','CATMain',params);
The Matlab command window output is as follows:
Error using Interface.catia_application.SystemService/invoke
Invoke Error, Dispatch Exception:
Description: ExecuteScript(C:\Users\ABCXYZ\Documents\MATLAB\TestCase\VirtGage, GetAxis.CATvbs, CATMain)
Internal error
Other similar invoke commands have worked. I am wondering if there is any way for this to work, and why the "description" line in the Matlab command window output misses out the variables 1 and params?

回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

製品


リリース

R2014a

Community Treasure Hunt

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

Start Hunting!

Translated by