Polyline order in multipart polyline - again

Discussion created by matejt on Oct 12, 2011
Latest reply on Oct 17, 2011 by matejt
Hi, let me rephrase my question.
I have many short polylines that I want to assemble into one multipart polyline in certain order. The consecutive number of each polyline is stored in attribute table.

My function reads the individual polylines in that order and adds them to the array object which is latter on assigned to the multipart polyline geometry. However, when I try to analize, that way generated, multipart polyline from beginning to the end, it does not proceed in the same order.

How can I define the order (first, second and so on) of segments which constitute multipart polyline? Thank you,