Change rank of ports via flexscript

Change rank of ports via flexscript

lambert
Not applicable
3 Views
1 Reply
Message 1 of 2

Change rank of ports via flexscript

lambert
Not applicable

[ FlexSim 22.2.2 ]

Hi, how can I change the order of the output ports in a conveyor via flexscript?

1663142134887.png

I want to move port 3 to the beginning of the list, so that it gets assigned first when send to port "first available" is selected.

I've tried https://archive.flexsim.com/threads/thread1733.html (setrank(rank(connectionsout(<object>),3),2) , but it doesn't seem to work.

Thank you!

0 Likes
Accepted solutions (1)
4 Views
1 Reply
Reply (1)
Message 2 of 2

jose_antonio_mad
Not applicable
Accepted solution

Hello @Lambert ,


You can use this:

Object obj=Model.find("Source1");
obj.find(">connections/connectionsout/3").rank=1;


I hope I have been helpful.


0 Likes