pythonfmipyfmi

How to get the unit of a variable with FMPy?


I am trying to get the units from the model variables to store as metadata. Is there a way to get the unit of a variable?


Solution

  • Please see how it is done in the dump command https://github.com/CATIA-Systems/FMPy/blob/439e0ea945286f2b717d28284af453a70ff64ec0/fmpy/util.py#L664