Logic : 1. in Snap i have two cable tray network (A to L and M to O). Now i want to add A letter in 1st tray of network-1,
once it assign all letter in network 1. then it should be start assigning next letter in 2nd network (in image it is M,N, and O)
I don’t know is it possible or or not. if possible then please provide your suggestion.
This is certainly possible, but achieving it with just OOTB nodes will probably be a bit of a pain. The way I would do it is by having the user select both the starting point, and all the elements to be sorted. Then loop through the list acquiring the endpoints of each element’s center line.
From there you can start with the element identified as your starting element, and then cycle through your list of points to find if any of those points overlap. Repeat until you’ve sorted the whole list.
Now, what I would suggest you do instead is check out the MEPover package. MEPover has various nodes that let you interact with an elements connectors. So you could select your starting point, and then use the ConnectedElements node to grab the next one in line. If you hit a T, you can add the extra one to a placeholder list to comeback and revisit.
I just found alternate way by putting “Elements in connected network” but its only select 1 network.
and, another issue is if I select 1st element then script give start numbering to next element. I don’t know why this happening any solution for this ?
Snap of Script: