Rename elements (beams,columns etc.) by X and Y direction

@imran_raj1985 imran, i need your help with similar task. I need to renumber (mark) for curtain panel , in elevation view. I need new number starting from 1 , on each floor. What changes i need to make in this script. I am novice with dynamo.