question

Gabriel illescas Cavazos avatar image
0 Likes"
Gabriel illescas Cavazos asked Adrian Haws answered

Write a massive tasks(Delay) in process flow I want to avoid Copy-Paste Process?

FlexSim 16.2.1
process flow
· 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.

1 Answer

Adrian Haws avatar image
2 Likes"
Adrian Haws answered

It depends on how your model functions, but you shouldn't need to use 100 delay activities for the same part of a process. As a general solution based on how you've explained it, you could execute a for loop to add the delay times for each of the tasks from your global table, then set that as your delay time.

If you do have, say, 5 delay activities and want to change their names incrementally you could do something like this:

  1. var processFlow = "Tools/ProcessFlow/ProcessFlow/Delay";
  2. var numberOfActivities = 5;
  3. for(int i = numberOfActivities; i > 0; i--) {
  4. var currentActivity = concat(processFlow, "~", numtostring(i));
  5. var activityName = concat("Name", numtostring(i));
  6. setname(model().find(currentActivity), activityName);
  7. }
5 |100000

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