Check if a conveyor segment is connected to a previous and a next segment

Check if a conveyor segment is connected to a previous and a next segment

guiroehe
Collaborator Collaborator
102 Views
2 Replies
Message 1 of 3

Check if a conveyor segment is connected to a previous and a next segment

guiroehe
Collaborator
Collaborator

Hello,

I am looking for a script to check if conveyor segments in a network have a previous and/or a next segment connected to them. As conveyor segments might have multiple "previous" segments or other decorations (decision points, etc.), I am not sure about hot to scan through the conveyorPoints to get the proper classification.

Thank you.

0 Likes
Accepted solutions (1)
103 Views
2 Replies
Replies (2)
Message 2 of 3

moehlmann_fe
Enthusiast
Enthusiast
Accepted solution

Due to the use of "sdt" values this is not guaranteed to work in other version, but should do so in the current one:

If the ownerobject of the node the conveyor point links to is a conveyor (determined by checking class name), then it represents a transfer.

Based on whether it's a side transfer for either conveyor and the distance along the conveyors' length I infer if it is an incoming or and outgoing connection.

One caveat: Since it uses the position of the transfer, some designs will break the logic, like having an outgoing connection at the very start of a conveyor.

Message 3 of 3

guiroehe
Collaborator
Collaborator

Thank you, @moehlmann_fe,

I wonder why conveyor connections are not treated as In and Out objects, and other decorations (decision points, etc.) as central objects. Or, at least, a similar structure.
Thank you for your continuous and kind support!

0 Likes