CATIA-Systems / FMPy

Simulate Functional Mockup Units (FMUs) in Python
Other
425 stars 117 forks source link

Dymola license when using remote desktop on windows #439

Closed dfpanchao closed 2 years ago

dfpanchao commented 2 years ago

Thanks for your working! When I use remote desktop to run co-simultion, it said I need the Dymola license. I have license to run Dymola, but seems it can't load when remoting. The error says: [FATAL] The license file was not found. Use the environment variable "DYMOLA_RUNTIME_LICENSE" to specify your Dymola license file.

Can FMpy set the environment path by code?

t-sommer commented 2 years ago

You can set the environment variable in Python like this:

import os

# copy the license path from Dymola > Tools > License Setup > File name
os.environ['DYMOLA_RUNTIME_LICENSE'] = 'c:/users/xxx/appdata/roaming/dassaultsystemes/dymola/dymola.lic'