The principle and classes of grating sensors are analyzed in this paper firstly. To the high-precision requirement of rangefinder for the measurement of high voltage cables, the design method based on grating sensor is proposed. It is realized by installing two grating sensors on the rangefinder platform which are used for outputting the elevation angle and the horizontal angle. The subdivision circuit of system is described in detail by using E-subdivision algorithm. Experiment shows that it can increase the measure precision greatly.