question

Bernard L2 avatar image
0 Likes"
Bernard L2 asked Jason Lightfoot edited

What is the red C node type?

In Statistics Collector, I created a timer every 60 min with 4 event using a Array (to add 4 lines in the table). In the columns tab, I add a Column set to get the value from a table for each of the 4 events. It all worked well till I create a second Statistics Collector with the same structure. I used the first one as reference for the steps I made and suddenly that first one stopped to work. Checking the Statistics collector tree I noticed the schedule and setValue node changed from node type "S" - Function (FlexScript) to "C" - Function (C++), with the "C" in red, which is a type not even listed in the user manual. I add a debug() to the code and it doesn't seem to run since the debug doesn't pop up.

2023-04-04-08-52-42-flexsim-2023-treenode-c-redfsm.png

The model also start to popup the "compile First" message when I run it, that didn't happen before and I just don't know what to do with that. Where can I compile the model? Doesn't matter which action I do (OK or Cancel) the error persists.


2023-04-04-08-58-11.png


in the model attached you find: TreeNode_C_Red.fsm

The first Statistic Collector that worked at first and I used as reference for the second one and now is not working (red C node type): sc_CalcPrancha_2


The second one that is working correctly: sc_Estoques2


Thanks in advance!


ps: I manage to fix it by deleting the node, copying and pasting the node from the second Statistics Collector I created, but that shouldn't happen, it just broke my Statics Collector.

FlexSim 23.0.6
tree nodestatisctis collector
· 1
5 |100000

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

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Bernard L2, was Matthew Gillespie's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered Jason Lightfoot edited

A red letter on a code node means it's not compiled. A red S -> uncompiled FlexScript. A red C -> uncompiled C++.

I'm not sure why those nodes are suddenly toggled as C++ though. You can fix the node by right clicking on those nodes and selecting Build > Toggle Node as C++ then Build > Toggle Node as FlexScript. To build the FlexScript on the node choose Build > Build FlexScript.

If you know what steps you did that turned those nodes into C++, it might be a bug we can fix.

· 5
5 |100000

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

Bernard L2 avatar image Bernard L2 commented ·

How to compile a uncopiled node?


I did as you said, right click + Toggle Node as FlexScript. The model and to Statistic Collector now run, the "Compile first" pop up doesn't show anymore, but the node still are market as "C" and now just one is red.


2023-04-04-14-38-10-flexsim-2023-treenode-c-red-2f.png


As for what I did, I just tried to replicate what I did in the first Statistics Collector, learning while doing it, so I'm not sure exactly the step by step I did.

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Bernard L2 commented ·
@Bernard L2 Sorry, you need to un-toggle the C++ first. I updated the steps in my answer.
0 Likes 0 ·
Bernard L2 avatar image Bernard L2 Matthew Gillespie ♦♦ commented ·
Thanks, know it worked.


About the compile first message, what does it mean, what can I do about?

0 Likes 0 ·
Show more comments