CATIA-Systems / FMIKit-Simulink

Import and export Functional Mock-up Units with Simulink
Other
155 stars 50 forks source link

v2.9 does not work in R2022b #396

Closed shah-aditya closed 1 year ago

shah-aditya commented 1 year ago

I am trying to use v2.9 in Matlab R2022b, but run into an error with the demo model. The reason for this is I have a FMU already imported using v2.9 in Matlab R2021b that I want to continue using in R2022b. Any help on this is much appreciated, thanks!

>> FMIKit.initialize
Initializing FMI Kit 2.9.0
>> fmikit_demo_BouncingBall

v2.9 initializes with no warning or error message. But the bouncing ball demo does not run.

Error resolving Custom Code. Caused by: E:\Development\FMIKit-Simulink\src\FMU.cpp specified in custom source files string does not exist in any of the following search directories: E:\Development\FMIKit-Simulink\src\FMU1.cpp specified in custom source files string does not exist in any of the following search directories: E:\Development\FMIKit-Simulink\src\FMU2.cpp specified in custom source files string does not exist in any of the following search directories: C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\x64\ShLwApi.Lib specified in custom library files string does not exist in any of the following search directories:

The path specified "E:\Development\FMIKit-Simulink" is not from my local computer setup - it appears to be something present in the test model? I initialized FMI Kit from a different folder location and name on my computer. FMU.cpp, FMU1.cpp, FMU2.cpp exist in the "src" sub-folder inside that.

shah-aditya commented 1 year ago

The issue is because the demo model has custom paths specified in the Simulation Target section: image In R2021b this works but in R2022b this errors out. After removing the custom paths the simulation runs correctly.

Requested change would be to remove the custom paths from the demo model.

t-sommer commented 1 year ago

Please try again with the latest release and reopen if the problem persists.