RobotStudio event

Teaching for external axis

Hi
friends
I want to teaching with Rs for pieces that installed on 7 axis just for rotation 
how can i get auto patching program for them , this is for coating 
My mean i need automatically turn the 7 axis and teach the point. 

Many thanks