Describe the prefered connectivity inside the group

Syntax: <GroupConnectionPreferenceList>
    <nextIndex from="...">...</nextIndex>
    ...
</GroupConnectionPreferenceList>
Default Value: If this tag is not present, when connecting a group, the next selected connection point will be the next one in the cycling list.
Description: A list of connection pairs.

The GroupConnectionPreferenceList field can be used to control the next prefered free connection point that will be selected when a connection is made. This field contains a list of nextIndex field, each entry indicating the next connection point that will be selected when the specified connection point is connected.

This field is similar to the nextConnexionPreference field of a single part (see the Describe the Connection Points page for more details) but it acts on the whole group. Indeed, if you consider a group of two straight rail tracks connected to each other, when you connect the group from the left extremity of the first track, you want to have the right extremity of the second track to be selected, not the right extremity of the first track (which is already connected to the second track). That's why we need a description of the prefered connection sequence at the group level.



The red numbers are the connection indice of the first part, the orange numbers are the connection indice of the second part, and the white number are the one that need to be used for the group.

The nextIndex field contains two indice. The first index is specified in the from attribute and the second index inside the field. When the "from" connection is connected then the connection point specified in the field will be selected. The indice are counted sequentially, from the first part appearing in the group list to the last one (respecting the order of the connections for each part). If the group contains another group, enter in that sub group first to count the indice before continuing on the current group. In other words, the hierarchical tree is explored in a deep way.

In the group example above, when the connection 0 is snaped, you want the connection 3 to be selected, and vice and versa. So you should write these two lines:

<GroupConnectionPreferenceList>
    <nextIndex from="0">3</nextIndex>
    <nextIndex from="3">0</nextIndex>
</GroupConnectionPreferenceList>