Contiguous Vertex List From Selection

When selecting 2 edges on a mesh in the order 0, 1; then converting the selection to vertices, I would expect maya to give me the order of the vertices in the order that I selected the edges. I now realize that was wishful thinking. Does anyone know how I could go about keeping the selection order in order?

This code creates a cube and selects edges 7 and 5 respectively. It then converts selection to vertices and prints out the array, however it prints it out in vertex number order from least to greatest instead of selection order.

CODE
polyCube -n "testCube";
select -cl;

select -r testCube.e[7];
select -tgl testCube.e[5];

string $dhU_selection[] = ls -sl -fl;
string $dhU_convertedEdges[] = polyListComponentConversion -tv;
string $dhU_selectedVertices[] = ls -fl $dhU\_convertedEdges;    
for($vert in $dhU_selectedVertices)
     {
          float $vertWSloc[] = xform -q -ws -t $vert;    
          print ($vert + " found at: \n" + $vertWSloc[0] + " " + $vertWSloc[1] + " " + $vertWSloc[2] + "\n \n");
     }

This is the same bit of code only slightly modified. It creates a cube, selects the vertices 5,3,1 in their respective order and prints out the array contents. Once again, it prints it out in vertex number order from least to greatest.
CODE
polyCube -n "testCube";
select -cl;

select -r testCube.v[5];
select -tgl testCube.v[3];
select -tgl testCube.v[1];

string $dhU_selection[] = ls -sl -fl;
string $dhU_convertedEdges[] = polyListComponentConversion -tv;
string $dhU_selectedVertices[] = ls -fl -sl;    
for($vert in $dhU_selectedVertices)
     {
          float $vertWSloc[] = xform -q -ws -t $vert;    
          print ($vert + " found at: \n" + $vertWSloc[0] + " " + $vertWSloc[1] + " " + $vertWSloc[2] + "\n \n");
     }

Same things happens with edge components. Is there no way to keep the selection order?

QUOTE(kurokawa @ 10/31/07, 01:22 AM) [snapback]275643[/snapback]
When selecting 2 edges on a mesh in the order 0, 1; then converting the selection to vertices, I would expect maya to give me the order of the vertices in the order that I selected the edges. I now realize that was wishful thinking. Does anyone know how I could go about keeping the selection order in order?

Maya just does not store this info, you can however parse it form undo if you wish (theres a really old post dealing with this nut i posted the aswer to same question and linkup less than 2 weeks ago i think). The prefeered way woudl nbe to make it a tool (ever notice how all maya multi selectors thet act on components are tools)

Do you know what the post was called so I can read it?

http://www.highend3d.com/boards/index.php?...9&hl=buffer