question

Begoña Espiñeira avatar image
0 Likes"
Begoña Espiñeira asked Jeanette F commented

OnReset - Module bug

I have created a module where I save the reset trigger here: maintree().find("project/events/OnResetModel/GMM_OnResetModel")

1738070389646.png

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: 1738070485242.png

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 :

1738071210427.png

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:


1738070485242.pngReset doesn't work

3. Save the model and close flexsim

4. Open the model and reset

1738071595645.png

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

FlexSim 24.2.1
modulesonresetbuildnodesavingmodule
1738070389646.png (45.6 KiB)
1738070485242.png (4.1 KiB)
1738071210427.png (102.2 KiB)
1738071595645.png (8.6 KiB)
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

0 Answers