question

martin.j avatar image
2 Likes"
martin.j asked Felix Möhlmann commented

Annoying Compile Notice

I am not using C++ but only Flexscript, bu at some point in my Flexsim project I have started to get an annoying compile message whenever I pres the run button after a reset. compile-notice.jpg I have seen this issue before but usually solved it by making a new model and copying my current model content into it, but its a fair amount of work. I would rather not spend the effort if there is a simpler way to solve this problem.

Any idea what causes this issue and how to solve it? It doesn't help to compile the session. It simply fails to compile.

FlexSim 17.1.4
compiler errornotice
compile-notice.jpg (14.1 KiB)
5 |100000

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

Phil BoBo avatar image
7 Likes"
Phil BoBo answered Paula LG commented

You get that message when the node MAIN:/project/exec/shouldcompile is not set to 0 when you start to run the model. That node gets set to a value other than 0 when various things happen in the program, such as toggling a trigger as C++ or loading a model/treenode with a C++-toggled node in it.

If you press OK (to proceed anyway) instead of Cancel, then the message will stop appearing in subsequent runs in that session of FlexSim, until you perform another operation that resets the value to non-0 again, such as toggling a node as C++ or loading a model/treenode with a C++-toggled node in it.

If you open the System Console and then execute the following script, it will print a list of all the nodes in your model that are toggled as C++:

applicationcommand("findallcodenodes", model(), 0, 1);

You can then find those nodes in your model and change them to not be C++.

Once you have no C++ nodes in your model, reset and run. The message will appear again. Press OK that you wish to proceed anyway. This will clear the variables that are tracking whether there are C++ nodes in your model. The next time you reset and run, that message will not appear and it will no longer appear when you save and reload the model if you successfully changed all the C++-toggled nodes to not be toggled as C++ anymore.

5 |100000

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

Borja Lorenzo avatar image
0 Likes"
Borja Lorenzo answered Felix Möhlmann commented

Hello, I need information on how to change the nodes from C++ to avoid this annoying notice. Thank you in advance.


In my case, these are the nodes:

1719473034354.png

"Velocidad de carretilla"

It is a custom code:

1719473124547.png

The custom code is:
1719473165916.png


"Si el num. conten. restantes <Nº max de puestos cuando se llenen Disponible=0>"

It belongs to a custom code within a process flow:1719473276104.png

1719473383244.png


The custom code "Selección de Carrista" belongs within this process flow:

1719473454375.png



1719473399646.png





1719473034354.png (22.3 KiB)
1719473124547.png (165.3 KiB)
1719473165916.png (22.2 KiB)
1719473276104.png (162.6 KiB)
1719473315007.png (35.0 KiB)
1719473383244.png (35.0 KiB)
1719473399646.png (35.0 KiB)
1719473454375.png (117.4 KiB)
· 4
5 |100000

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

Felix Möhlmann avatar image Felix Möhlmann commented ·

Click on the "S" at the bottom of the window and apply the changes.

capture1.png

1 Like 1 ·
capture1.png (2.4 KiB)
Borja Lorenzo avatar image Borja Lorenzo Felix Möhlmann commented ·
Thanks a lot again Felix


0 Likes 0 ·
Borja Lorenzo avatar image Borja Lorenzo Felix Möhlmann commented ·

If I use internal code, does that mean option "S"always has to be selected? (For external code, option "E" has to be selected.)

What exactly does function "S" mean?



0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Borja Lorenzo commented ·

The buttons at the bottom set the node type which determines as what type of code the text inside the node will be interpreted.

Whenever you edit code in FlexSim it should by default be set to FlexScript. I can't say how yours ended up as C++.

1719814997057.png

0 Likes 0 ·
1719814997057.png (16.6 KiB)