Error using invoke method to execute script (in Catia)
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!