1. A method in connection with programming of an industrial robot, comprising teaching the robot a path having a number of waypoints located on or in the vicinity of an object to be processed by the robot, the method comprising: obtaining information about the position of the waypoints in relation to the object, storing the information about the position of the waypoints, simulating the robot path based on the received information about the waypoints and a model of the robot, generating a graphical representation of the robot path based on the simulated robot path, and displaying a view comprising the object and said graphical representation of the robot path projected on the object.