Error using invoke method to execute script (in Catia)
5 views (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!