read a file inside a DLL generated by matlab coder

11 次查看(过去 30 天)
Good morning
I am currently developing a Matlab application usable under C# via a DLL from Matlab Coder
In this application I need to read files in XML format based on an XSD file. This XSD file must be delivered in addition to the DLL to work correctly.
I figured out how to add the XSD file to the DLL and am able to generate it.
Therefore, my question is : how can I give this file as input to my Matlab reading function so that it can read it from a call to the DLL in C#? I'm currently using an isdeployed condition but I don't know what to put as the path to the file to read.
Thank you in advance for your help :)
  1 个评论
Ji Lee
Ji Lee 2024-2-7
If attempting to single source the file content as a resource not accessible to MATLAB Code (i.e. requiring C/++ APIs to access), here is documentation for coder.ceval. This can be used for invoking C/C++ routines from within MATLAB code intended for code generation usage.
If it is okay to simply read the original XSD file from the file system, here is documentation describing MATLAB Coder support for reading files.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulink Coder 的更多信息

产品


版本

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by