question

Jimmy avatar image
0 Likes"
Jimmy asked Jimmy commented

How to create CP connections by flexScript?

Because the content of this page has become blank, I cannot get the answer and need to ask again.


I want to create CP by flexScript, and create "Location" Connection to Queue by FlexScript too.

Thank you
https://answers.flexsim.com/questions/64986/create-connection-btw-cp-and-queue-by-flexscipt.html

FlexSim 23.2.2
controlpoints
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·

Try it with contextdragconnection to a fixed object. The result should establish an exit transfer object .

0 Likes 0 ·

1 Answer

Patrick Zweekhorst avatar image
1 Like"
Patrick Zweekhorst answered Jimmy commented

Hi @Jimmy ,

You can work with the contextdrawconnection command, or with the addConnection function_s command. This code shows an example with the function_s command:

Object controlPoint = Model.find("ControlPoint1");
Object queue = Model.find("Queue1");
int connectionRank = 1; //1 is location. This is from the Control points connections tab of the AGV network. Use another rank if you need different connection
function_s( controlPoint, "addConnection", connectionRank, queue );

Hope this helps

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

Jimmy avatar image Jimmy commented ·

Thank you! It helps!

0 Likes 0 ·