question

tomonori S avatar image
0 Likes"
tomonori S asked tomonori S commented

How to count process flow objects

Please tell me how to count the process flow objects used in the simulation model.

I have run the script below, but the correct value is not returned.

FlexSim 18.0.10
count process flow
7tgwv.png (4.5 KiB)
eb4zx.png (10.6 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.

1 Answer

Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered tomonori S commented

That script does return the number of Process Flow objects in the model. However, if you want the number of process flow activities in a process flow you need to add up all the sub nodes of the process flow.

This script will add up all the activities in all the process flows in the model:

treenode processFlows = model().find("Tools/ProcessFlow");
int numActivities = 0;
for (int i = 1; i <= processFlows.subnodes.length; i++)
	numActivities += processFlows.subnodes[i].subnodes.length - 1;
	
return numActivities;
· 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.

tomonori S avatar image tomonori S commented ·

It worked with the posted function.
Thank you very much.

0 Likes 0 ·