Perhaps I have misunderstood and you are trying to do something much more complicated, but if you are enquiring about the codes for building a custom organ design module CODM file, and let us say the string division is assigned to (the notional) manual 5 the coupler codes for the two pistons are respectively 1126. Manual5 to Manual1 8ft and 1226. Manual5 to Manual2 8ft. (pp 50-57 of the CODM user guide - Coupler Table).
Of course, you could also use the HW master couplers feature to do the same thing.
Ensuring that both are not engaged simultaneously, if you need that, requires a bit more trickiness.