According to an older GE tube manual I have, the 7AF7 and the 6SN7 have very different pin connections for their internal elements. Therefore you would have to either use some sort of appropriately wired socket adapter, or rewire the connections of the tube socket inside the chassis. Otherwise the substitution would not work, and serious damage would be a strong possibility.
Even with such an adapter or rewiring, there are some differences in the electrical characteristics of the two tubes that could perhaps cause issues in at least a few designs. That is especially possible if the design is based on the 6SN7-GTA or -GTB, rather than the 6SN7-GT, the GTA and GTB versions of the 6SN7 being rated to be able to handle significantly higher plate voltages and power levels than the -GT version or the 7AF7.
Regards,
-- Al
Even with such an adapter or rewiring, there are some differences in the electrical characteristics of the two tubes that could perhaps cause issues in at least a few designs. That is especially possible if the design is based on the 6SN7-GTA or -GTB, rather than the 6SN7-GT, the GTA and GTB versions of the 6SN7 being rated to be able to handle significantly higher plate voltages and power levels than the -GT version or the 7AF7.
Regards,
-- Al