Error using invoke method to execute script (in Catia)

조회 수: 11 (최근 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 CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품


릴리스

R2014a

Community Treasure Hunt

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

Start Hunting!

Translated by