Subbassemblies have input and output values. You can set up your subassembly to output the value you need to use in a subsequent subassembly. Just keep in mind that you can't use the output from a subassembly that hasn't been calculated yet. Corridors build in sequence, top to bottom in the construction tab of the assembly properties. You can't take the output from a subassembly and use it in a different subassembly above it in the list (that output property hasn't been calculated yet so it can't be used).