question

Abhay Bajpai avatar image
0 Likes"
Abhay Bajpai asked Felix Möhlmann commented

"So.Subnodes" does not list all subnodes of flowitem.


Hello!


Problem #1: For some reason my model's flow item's "so.subnodes" do not show up. Just the first item that was created shows up. What could be the reason behind this?

1695331152189.png


Problem #2: Why does the flow item referred here as "product"? Does that create any issue?

1695331377506.png

ChampionHomes_V8_0.fsm


FlexSim 23.2.0
subnodes array
1695331152189.png (151.2 KiB)
1695331377506.png (149.2 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.

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

The items on the conveyor are nested inside each other. You are only looking at the direct subnodes of the conveyor, which is only item called "Product".

capture.png

You could write a user command that recursively adds all levels of subnodes to an array. (In the example below, the start node (conveyor) is also part of the array at the first position)

  1. treenode curNode = param(1);
  2. Array allNodes = [];
  3.  
  4. for(int i = 1; i <= curNode.subnodes.length; i++)
  5. {
  6.     allNodes = nestedSubnodesToArray(curNode.subnodes[i]).as(Array);
  7. }
  8. allNodes.unshift(curNode);
  9. return allNodes;

capture.png (2.9 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.

Jeanette F avatar image
0 Likes"
Jeanette F answered

Hello @Abhay Bajpai,

In the Parts array the second index contains a string that will be used to select the flow item that will be created. It is not able to because the string does not end up matching anything in the flow item bin because there is a 1 at the end of it

1695434048861.png



1695434048861.png (2.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.