question

Lambert avatar image
0 Likes"
Lambert asked José Antonio MD answered

Change rank of ports via flexscript

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!

FlexSim 22.2.2
port order in flexscript
1663142134887.png (13.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

José Antonio MD avatar image
0 Likes"
José Antonio MD answered

Hello @Lambert ,


You can use this:

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


I hope I have been helpful.


5 |100000

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