In this paper, we describe development of a polygon mirror based laser micrometer for magnet size measurement for undulator fabrication. In the laser micrometer, a laser light source is focused on to the facets of a rotating polygon mirror at an angle of 350 that reflects the laser beam. The parallel light emerging from the polygon mirror surface falls on the object through an F-theta lens. The F-theta lens is used for collimating the output of a scanning mirror system and to provide a flat field at the image plane of the scan. The object obstructs the light. A collimating lens at the other side of the object focuses the light onto a detector. The shadow caused by the obstruction results in an output voltage for a period of time that is proportional to the size of the object. We have used the laser micrometer for 12.5mm and 6.25mm magnets measurement. This is an efficient noncontact method of magnet sorting for use in undulator fabrication, synchrotron radiation and FEL application.