      program makelay
      parameter (npadinrow=7,nrow=5,npad=npadinrow*nrow)
      parameter (width=2.,height=6.)
     
      open(30,file='layout.txt') 
      
      write(30,'(I4,3x,"pads")')   npadinrow*nrow
      write(30,'(I4,3x,"groups")') npadinrow*nrow
      write(30,'(I4,3x,"rows")')   nrow
      write(30,'(I4,3x,"max number of pads in a group")') 1
      write(30,'(I4,3x,"max number of pads in row")')     npadinrow 
      write(30,'(I4,3x,"max number of groups in row")')   npadinrow 
      write(30,'(55("*"))')
      write(30,*)' Example of layout'
      write(30,'(23x,27Hcentre [mm]       size [mm])')
      write(30,*)'  Pad  Group  Row     x        y        x        y'
      
      i=0
      do irow=1,nrow
         y = (irow-0.5)*height
         do ipad=1,npadinrow
            x = (ipad-0.5)*width
            i = i+1
            
            write(30,100) i,i,irow,x,y,width,height
         enddo
      enddo
      
  100 format(3I6,4F9.3) 

      end
