- 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?
3 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Madheswaran
2025 年 2 月 23 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Use COM Objects in MATLAB についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!