I am unable to access the Modelica.Utilities.System.getTime() function on Modelica. For some reason it does not exist in the MSL in Plug-in dependencies. Any idea how to import this?
Asked
Active
Viewed 56 times
1

marco
- 5,944
- 10
- 22

sairam.nagareddy
- 79
- 4
-
Which tool are you using? – jrhodin Apr 08 '20 at 20:42
-
2Looks like OneModelica, which also is listed at https://modelica.org/tools, but no longer publically available. – tbeu Apr 09 '20 at 06:51
-
I am using dymola as the GUI and compiler. Although I can find the getTime function in MSL in Dymola, I am unable to find it in my project explorer in One Modelica. – sairam.nagareddy Apr 10 '20 at 00:08
1 Answers
3
Modelica.Utilities.System.getTime was added for MSL 3.2.2 (April 2016). Is it possible that you loaded an older version of the MSL?

tbeu
- 1,235
- 7
- 12
-
I can see the getTime() function in dymola MSL but not in One Modelica when I'm working on my project. Hence when I use the Modelica.Utilities.System.getTime, Modelica gives me an error saying it cannot find the function getTime. As shown in the picture the MSL imported under Plug-in dependencies does not show getTime function listed. Any idea how to update it or import it ? – sairam.nagareddy Apr 10 '20 at 00:09
-
Is there any other way to get the local time in Modelica if I cannot use Modelica.Utilities.System.getTime()? – sairam.nagareddy Apr 10 '20 at 00:11
-
You can just download the newer MSL, and either use that, or copy the relevant functions to your library. – matth Apr 16 '20 at 14:21
-
That will not work out of the box, since ModelicaInternal_gettime of ModelicaInternal.[ch] requires an updated ModelicaExternalC to be provided by the tool vendor. – tbeu Apr 16 '20 at 17:59