Unknown hook 'FMUExportTestingMode'. Either no such hook is registered or the module registering the hook is currently not loaded.
Show older comments
I'm trying to run a script that generates FMUs using the MATLAB function exportToFMU. I ran it successfully many times yesterday. When I started MATLAB today and ran my script I got this error message:
Error using GenerateFMUs (line 12)
Unknown hook 'FMUExportTestingMode'. Either no such hook is registered or the module registering the hook is currently not loaded.
The code I use to generate the FMUs:
exportToFMU(modelName,'FMIVersion','2.0','FMUType','CS', 'CreateModelAfterGeneratingFMU', 'off', 'supportMultiInstance', 'on', 'SaveDirectory', outputFolder, 'FMUName', fmuName64Bit)
exportToFMU(modelName,'FMIVersion','2.0','FMUType','CS', 'CreateModelAfterGeneratingFMU', 'off', 'supportMultiInstance', 'on', 'SaveDirectory', outputFolder, 'Generate32BitDLL', 'on', 'FMUName', fmuName32Bit)
UPDATE 1:
If I open and close Simulink once, the error goes away and I am able to generate FMUs.
UPDATE 2:
Added code example.
2 Comments
Jacob Mathew
on 21 Nov 2024
Hey Nils, could you share the model ?
Nils Lande
on 21 Nov 2024
Accepted Answer
More Answers (0)
Categories
Find more on Export Simulink Model as Standalone FMU in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!