Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

CS and ME of OMEdit and visual studio 2017

CS and ME of OMEdit and visual studio 2017

   Hi,
I am using omedit to export FMU, I call FMU through visual studio 2017, but the following problem occurs:

code:
  assert            | debug   | Failed to open file (null)/BouncingBall_info.json for reading: No such file or directory
getBestJumpBuffer got mmc_jumper=0000000000000000, globalJumpBuffer=0000000000000000



Can you help me?
I have put the JSON file in the current path, but the computer still can't find the JSON file.

P.S. Sorry for my bad English!

Re: CS and ME of OMEdit and visual studio 2017

You need to unpack the FMU at a certain location and set the resource folder.

See the spec:
https://github.com/modelica/fmi-standar … -2.0.2.pdf

Code:


fmi2Component fmi2Instantiate(fmi2String instanceName,
fmi2Type fmuType,
fmi2String fmuGUID,
fmi2String fmuResourceLocation,    // <----- this needs to point to the place where you unpacked the FMU
const fmi2CallbackFunctions* functions,
fmi2Boolean visible,
fmi2Boolean loggingOn);

You need to unpack the fmu to a directory and then give that directory as an URI via the fmuResourceLocation parameter when you call fmi2Instantiate.

Or you could use an existing C library that can load your FMU properly such as FMILIB: https://github.com/modelon-community/fmi-library

Re: CS and ME of OMEdit and visual studio 2017

Thank you very much for answered my question.
I have solved this problem, and the reason is that the generated library is C library. I use the C + + platform.
Finally, thank you very much for your answer.

Re: CS and ME of OMEdit and visual studio 2017

老乡? 加下QQ 295213096

Edited by: peter - Mar-23-21 08:50:18
There are 0 guests and 0 other users also viewing this topic
You are here: