question

Devdatta D avatar image
0 Likes"
Devdatta D asked Andrew O commented

Add exit transfers to conveyor using flexscript

When I add A connect to the conveyor it uses existing ExitTransfer, I would like it to create a new exit transfer. I am using contextdragconnection command.

FlexSim 22.1.1
flexscriptconveyorsexit transfer
· 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.

Andrew O avatar image Andrew O commented ·

Hi @Devdatta D, was one of Jason Lightfoot's or Kavika F's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·
Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Jason Lightfoot edited

I uses the relative positions of the two objects being connected to determine if an existing exit transfer should be used or a new one should be created.

In the case of a conveyor connecting to a fixed resource, if the side projection of a transfer overlaps the fixed resources bounding box, that transfer can be re-used. If the bounding box of the fixed resource does not overlap a transfer than the centre of the fixed resource is projected on to the conveyor length and a new transfer created at that point.

In the case of connecting two conveyors the start of the conveyor is used in the same manner.


This means that you can either move the transfer along the conveyor or move the second object such that either approach will create a second transfer.



5 |100000

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

Kavika F avatar image
1 Like"
Kavika F answered

Hey @Devdatta D, when you create an A-connection from a conveyor to another fixed resource, it automatically creates an ExitTransfer relative to the location of the fixed resource it is going to. Here's a post that explains it a bit more.

If you want to move ExitTransfers to different locations, then you can try following this post's instructions. Or if you want to get a reference to one, try this post.

As for creating new ExitTransfers, you'll need to ensure that whatever the transfer is connecting to is far enough away from the existing "default" transfer that a new one will need to be made.

For example, this may be too close:

1659650713823.png

while this is fine:

1659650742106.png

Notice the differences in Sink2's position. The same code was used, but one made an ExitTransfer2 while the other just used the existing one.


1659650713823.png (228.4 KiB)
1659650742106.png (243.4 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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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