I have a Modelica function that calls an external C function. At the moment, I am only able to run it with the setting Advanced.CompileWith64 = 2
I would like to wrap this function in a way that the flag Advanced.CompileWith64 is set to the value 2 before calling the external function, and afterwards it is set to its original value.
Conceptually, something like this:
function myFunctionWithWrapper
...
algorithm
originalFlagValue := readFlag(CompileWith64)
setFlag(CompileWith64, requiredFlagValue) "set Advanced.CompileWith64 = 2"
myExternalFunction(...)
setFlag(CompileWith64, originalFlagValue)
end myFunctionWithWrapper
Is there a way to read and to set a Dymola flag from a Modelica class?