Skip to content

Generating flexible FMU out of Python code with different variables, problem creating class before build #200

@till12mann

Description

@till12mann

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions