question

Alireza Hashemloo avatar image
0 Likes"
Alireza Hashemloo asked Alireza Hashemloo commented

How to copy connections (upstream and downstream) of an area in the flowchart to a new area?

Hello,

Using Flexsim Healthcare, I was wondering if there is a script that I can use to copy all connections (upstream and downstream) of an area in the flowchart to a new area. Such feature allows for not adding several identical connections manually for new areas in the flow chart.

Thank you,

Alireza

FlexSim HC 5.1.0
connectionflowchartarea
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
1 Like"
Matthew Gillespie answered Alireza Hashemloo commented

Here's an example model and here's the script:

  1. treenode area1 = node("BedArea", AreasNode);
  2. treenode area2 = node("ComputerTableArea", AreasNode);
  3.  
  4. for(int i = 1; i <= nrop(area1); i++)
  5. {
  6. treenode otherArea = node("+/~", rank(connectionsout(area1), i));
  7. contextdragconnection(area2, otherArea, "A");
  8. }
  9.  
  10. for(int i = 1; i <= nrip(area1); i++)
  11. {
  12. treenode otherArea = node("+/~", rank(connectionsin(area1), i));
  13. contextdragconnection(otherArea, area2, "A");
  14. }
  15.  
  16. TransferAreaConnections();

· 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.