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:

treenode area1 = node("BedArea", AreasNode);
treenode area2 = node("ComputerTableArea", AreasNode);

for(int i = 1; i <= nrop(area1); i++)
{
	treenode otherArea = node("+/~", rank(connectionsout(area1), i));
	contextdragconnection(area2, otherArea, "A");
}

for(int i = 1; i <= nrip(area1); i++)
{
	treenode otherArea = node("+/~", rank(connectionsin(area1), i));
	contextdragconnection(otherArea, area2, "A");
}

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.

Alireza Hashemloo avatar image Alireza Hashemloo commented ·

@Matthew Gillespie Thank you! I tested the script on a current project file for a couple of areas and did not encounter any issues. This is very useful.

On a side note, I was wondering if it is possible to have the capability for selecting a number of areas in the scene as a list and making connections so that any given area in the selection list is connected with all other areas in the same selection set? This will be particularly helpful to avoid missing connections for larger and more complex simulation scenes. I do not know whether having "too many" connections between areas in the flowchart would impact the model's performance or not.

0 Likes 0 ·