Scraping is a key technique in high-precision machine tools. The accumulated tolerance from machine tools is eliminated by scraping. In generally,scraping is used for fixing the workpiece by the judgment and experience of technician. In this paper, an automatic scraping system is developed by Visual C++ MFC. The automatic scraping system comprises a light-scattering-type triangulation laser, a computer numerical control (CNC) machine tool, and an automatic scraping mechanism. The automatic scraping system is used in traditional scraping and assembly process. First, triangulation laser is used for measuring the angle error and surface of workpiece. Then, the Automatic scraping mechanism can be used to modify the angle error and speed distributed pattern on the workpiece.