#Commands: These are some of the commands supported:
- addNode
- addLink
- getNodes
- getCurrentStep
- getSimNodes
- deepCopyNode
- deleteEntities
. . .
You can add more at
Definition PythonEngineCommands.h:8
If you need to add function related to control of simdump simulation go to:
Definition DataManager.h:28
#Save/Load Python state Using python, we can also save the state of envirnoment in .mar format by executing:
# Save functions
def my_function():
return 4
def add_numbers(x, y):
return x + y
save_functions("functions.mar",
my_function=my_function,
add_numbers=add_numbers)
To load, do:
loaded_names = load_functions_to_globals("functions.mar")
print(f"Loaded: {loaded_names}")