Why can I not access some COM objects in Matlab that are available from a VB script?
Show older comments
I have a VB script which sucessfully accesses objects and methods in Vector CANalyzer - the gist of the code is:
Set App = CreateObject("CANalyzer.Application")
App.Open (PathConfig & "Easy.cfg")
Set Logging = App.Configuration.OnlineSetup.LoggingCollection(1)
Set Exporter = Logging.Exporter
With Exporter.Sources
.Clear
.Add (src_file)
End With
Exporter.Load
Exporter.Save True
But when I try the same operation in Matlab, I don't seem to be able to access the 'Exporter' object - I can only get as far as the
'LoggingCollection' object, which I can call methods from.
app = actxserver('CANalyzer.Application');
logging = app.Application.Configuration.OnlineSetup.LoggingCollection;
invoke(logging)
test = Add(logging);
Quit(app);
delete(app);
I've tried following the advice on this thread, trying to access objects and methods even though they're not visible, but this doesn't work either. i.e.
testValue = get(app.Application.Configuration.OnlineSetup.LoggingCollection.Logging, 'FullName');
Returns error: 'No appropriate method, property or field Logging for class Interface.413... etc...
Am I setting up the COM server incorrectly, or is this a peculiarity of the program I'm accessing? Is there any way to solve this problem?
Many thanks,
Tom
Accepted Answer
More Answers (0)
Categories
Find more on Use COM Objects in MATLAB in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!