Hello @shashank.baganeACM ,
Sort by XYZ.dyn (45.3 KB)
I have tried to solve your problem,
1st it will sort all the beams with respect to Z (Start from 0 and increasing order)
then it as showing in the image above ( at fixed level or constant Z value) not sort the in X & Y direction and assign the number in increasing order.
and for next level (or Next Z value) numbering will start from 9 and so on