Generating flexible FMU out of Python code with different variables, problem creating class before build
Opened this issue · 0 comments
till12mann commented
Discussed in #198
Originally posted by till12mann December 12, 2023
I am trying to generate an FMU out of a running python script. I want to hand over the variables I need (I/Os of the FMU) and then build the FMU. I can build the FMU with os.system("pythonfmu build -f fmu_generator.py VSCode")
, but when I want to hand over my variables, I have to create the class "FMUGenerator" or in case of the example code "PythonSlave" bevor building it with the prompt. Is that even possible? Because what ever I do, I always get a KeyError: 'instance_name'. Any Ideas how I can fix that? If you need any more information let me know.