The precise measurements of the magnetic field are essential for particle accelerators, and the harmonic coil measurement system is especially suitable for the multipole field because of its unique advantages. The accurate placement of magnets is essential for accurate magnetic field measurements. The current positioning technique employed for harmonic coil measurement is inefficient due to its labor-intensive and time-consuming nature. The aim of this study is to automate the positioning of the quadrupole magnet. Therefore, a close-range photogrammetry system is utilized to monitor the position of the magnet due to its non-contact feature, and an electrically driven Stewart platform is utilized to manipulate the magnet. Meanwhile, a control system has been developed to regulate the automatic positioning. The system is capable of receiving measurements from the close-range photogrammetry system in order to ascertain the displacements of the magnet from its current position to the target. Subsequently, it can transmit commands to Stewart platform to regulate its movement. The experiments indicate that the efficiency of the quadrupole magnet positioning has increased significantly by at least 5 times, and the final positioning accuracy was verified by the laser tracker. The study also addresses the potential application of this technology in high radiation environments that are otherwise inaccessible.