Search found 4 matches

by valen0205
Thu Nov 07, 2024 4:22 pm
Forum: Vensim
Topic: SETVAL in Python
Replies: 1
Views: 2686

SETVAL in Python

Hello! I defined this function in Python to set the values of some variables in game mode. def set_value(var_name, value): command = f'SIMULATE>SETVAL|{var_name}={value}' result = vensim_dll.vensim_command(command.encode('utf-8')) if result == 0: raise Exception(f"Failed to set value for '{var_...
by valen0205
Thu Sep 05, 2024 4:19 pm
Forum: Vensim
Topic: DLL vensim_get_vecvals
Replies: 1
Views: 2256

DLL vensim_get_vecvals

Hello, I’m currently working on a Vensim model from Python using the DLL. I’m trying to get the values of a vector, and while the code is running, it’s not returning the correct result (it’s returning -1.2980742e+33 when the value should be 10). Any ideas on what might be happening? Here is a sample...
by valen0205
Wed Aug 14, 2024 4:04 pm
Forum: Vensim
Topic: Vector variables DLL-Python
Replies: 4
Views: 5190

Re: Vector variables DLL-Python

Sorry, I meant was how can I call an existing variable that is a vector?
How can I call the indexes of it?
by valen0205
Wed Aug 14, 2024 3:21 pm
Forum: Vensim
Topic: Vector variables DLL-Python
Replies: 4
Views: 5190

Vector variables DLL-Python

Hello! I am currently working on a project where I need to assign names to the indexes of vector variables in a Vensim model using the Vensim DLL from Python. I have been able to set and get scalar variables successfully, but I am encountering difficulties with vector variables, particularly with as...