import os
import sys
import OMPython
from OMPython import OMCSessionZMQ
print(sys.version)
print(os.getcwd())
omc = OMCSessionZMQ()
cmds = [
"getVersion()",
"loadModel(NcDataReader2)",
"loadModel(BuildingSystems)",
"getClassNames()",
]
for cmd in cmds:
answer = omc.sendExpression(cmd)
print("\n{}:\n{}".format(cmd, answer))3.5.5 |Anaconda, Inc.| (default, Mar 12 2018, 23:12:44) [GCC 7.2.0] /media/proto/942ea58f-5397-4c08-aa32-b507c86d1c07/IA/Energy_code/BuildingSystems-modelica
2018-04-26 20:32:49,101 - OMPython - INFO - OMC Server is up and running at file:////tmp/openmodelica.proto.port.e2c0dbd1362c4e4bba1d9086c092d3a6
getVersion(): OpenModelica 1.13.0~dev-924-g9375dc8 loadModel(NcDataReader2): False loadModel(BuildingSystems): False getClassNames(): ()
It gives me False when I am trying to load the model, It seems that NcDataReader2 have to be installed, but I dont see anything about how to load BuildingSystems in the doc