Off-line programming technology is frequently used in advanced robot assisted thermal spraying process, such as ABB RobotStudio, which offers excellent functions to simulate the real working environment of robot in order to test the robot trajectory. It also provides the add-in programs to make the simulation easier. ANSYS is an engineering simulation software which offers the function of modeling analysis with grids. The mesh on the surface of workpiece represents a layer with good coverage that can be the reference to create robot trajectory on it. This study provides a new ideal to combine those two technologies (or software) in order to realize the auto-generation of the robot trajectory for thermal spraying. Based on the function of the add-in program, we can transfer the data between RobotStudio and ANSYS using C# programming and then create the trajectory according to the operation parameters. Some experiments have shown that this method can effectively reduce the time required for robot programming.