read a file inside a DLL generated by matlab coder

14 vues (au cours des 30 derniers jours)
maga
maga le 29 Jan 2024
Commenté : Ji Lee le 7 Fév 2024
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 commentaire
Ji Lee
Ji Lee le 7 Fév 2024
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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Simulink Coder dans Help Center et File Exchange

Produits


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by