For initial set up I will manually teach each of the tool locations using global coordinates like I do for my fixtures, and use that coordinate system when doing the tool change just like it already knows where the bit zero is. I will store the locations either directly in the script or if I am lazy or in a csv file to make it easier for people to copy me. This should not need to be done again unless something moves.
I think your confusion is how does the post processor know when to do itâs thing. The script will need to find the tool number called out in gcode and also need to remember what dock it picked up the tool from.
What I need to do is first figure out how carbide or when I stop being lazy v carve (I have it, I need to learn it still) tells you when to do the manual tool change. All I need to do is look for specific commands related to it.
At that point I know with carbide it pushes a message out to the user says put in tool #100 for example.
All I need to do is have an associated list of tool numbers to tool holders this will be easy to make in excel 2 minutes of work. so if I tell the post processor tool x it knows to pull the coordinates from the file for holder y.
Using gadgets I may even be able to automate it right in vcarve though I have yet to learn anything about them so we will see.
Anyway once I know where in the code and what dock I just need to remove the wait for user input from the gcode, then drop in the appropriate script to drop off the tool when the spindle has no motion (need to figure that out) and pick up the next tool.
I also need to figure out how to start a project. Do I start with a tool mounted or do I start with nothing. If I start with nothing I will need to figure out of to trigger the valve this is where I need to figure out if I can control an output at all or I have to be clever. If I start with a tool mounted then I need to make sure dock 1 probably is empty.
So bit setter needs to be bit setter I canât have that input. I have a bit zero but never use it, so I can probably grab that input point if I have to I just need to find its gcode. For outputs maybe but runner? I have no idea if bit runner is available when your using a vfd spindle or not. If it is awesome, If not and no other outputs I have a solution for that but itâs just going to be a little unorthodox.
If need be I can create a little buffer circuit so I can run the output of ATC to the input of the Carbide controller.
The output gcode from the post processor will not have variables it will be all hard code, any variables will only exist on the processing script.
As far as rotory I ment do to something like 2 sided milling take for example a 2 sided PCB, it would be nice to mill your circuit on one side have the fixture flip it and mill the second side I would need my x y and z I think for that. But that is a really cool video thanks 
I already have tool changing scripts for my 3d printer I have a diy tool changer printer. Functionally itâs the same thing I just have write more of the scripts myself and âmanuallyâ inject them into the gcode rather then being able to just call a function.