Change Robot Machining / Riveting heads in the Machining Environment

Hello Everyone,
I am trying to program a robotic cell to do both Machining tasks, riveting and Inspection tasks. My question is: How can I change Robot Milling Spindle / End effectors in the Machining applications and have these tasks in my manufacturing program.

In the end the output should be a manufacturing program with the following for example:

1- Robot moves to Spindle position and attaches the spindle

2- Robot performs Drilling operation

3- Robot detaches the Spindle

4- Robot goes to Riveting end effector position and attached the end effector.

5- Compute and generate NC code output using PPs.


Thanks a lot for your help,
AbdelRahman