A temporary operation path is set by connecting a plurality of welding
points in a virtual space generated by a computer to investigate whether
an end effector can be operated along the temporary operation path. If
the operation cannot be operated, a path to avoid interference with a
workpiece is set automatically while extracting a portion in which the
workpiece exists in the internal space surrounded by the end effector in
order to set a narrow-area operation path for withdrawing the end
effector from a welding point. Next, in order to set a wide-area
operation path for making movement between withdrawing points, a template
operation is applied, in which the end effector is moved by a prescribed
distance in a prescribed direction.