- https://mathworks.com/help/matlab/using-com-objects-in-matlab.html
- https://mathworks.com/help/matlab/ref/com.html
how to include COM API in m scripts?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I am trying to automate dSPACE Configuration desk. I need to find the way to include the dSPACE COM API into m scripts. your support is greatly appreciated.Thank you
0 comentarios
Respuestas (1)
Madheswaran
el 23 de Feb. de 2025
Hi Ghamdan,
You can use 'actxserver' to creates a local OLE Automation server, where 'progid' is the programmatic identifier (ProgID) of an OLE-compliant COM server, for your case it is 'dSPACE Configuration Desk'. The function returns a handle to the default interface of the server. Make sure MATLAB and dSPACE Configuration Desk are installed, and dSPACE Configuration Desk provides OLE Compliant COM interface.
Here's a simple example of how to create and release a COM server connection:
configdesk = actxserver('progid'); %Replace 'progid' with Program ID for dSPACE Configuration Desk
% ... Your automation tasks go here ...
delete(configdesk); % When done, release the COM server
To find the list of COM Server Program ID of all programs that provides COM interface and installed in your computer, refer to this answer: https://mathworks.com/matlabcentral/answers/126654-how-to-know-the-com-server-program-id-of-various-applications-to-use-in-matlab
For detailed information about the API methods and properties available to interact with dSPACE Configuration Desk through COM automation, please refer to the dSPACE Configuration Desk documentation.
For more information on how to use the COM Interfaces with MATLAB, refer to the following documentations:
Hope this helps!
0 comentarios
Ver también
Categorías
Más información sobre Use COM Objects in MATLAB en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!