I have created a module where I save the reset trigger here: maintree().find("project/events/OnResetModel/GMM_OnResetModel")
I added to the code:
print("ResetOK"); at the begining of the code
print("ResetDONE"); at the end of the code
Moreover, I added another print inside of an user command inside of the code GMM_OnResetModel : print ("Executing GMM_updateViewSettings"); to check that the code inside of the reset is executing all the user commands correctly.
If I close flexsim and I open a new model where I use my module this is the behaviour when I click reset:
I obtain this but my users command were not executed so all the code written in the Reset was not executed.
If I go to my node and I build node as FlexScript I get this :
This means that my Reset command is working well.
I built the node and saved my module again, but the same problem is happening, somehow the module doesn't save it built? I could add some code to build that node when I install the module but it doesn't make sense for me...
If I don't build the node, I found another way so that my reset works well:
1. Open new model and install module
2. Reset model:
3. Save the model and close flexsim
4. Open the model and reset
Now the reset command works, I guess the saving operation is doing something so that this node works properly, as the build node operation.
How can I save a module that has the command working when I create a model? I would really appreciate some help.
Begoña Espiñeira Sicre