Its very possable. I am trying to find the picture of it, thought it was Steve, but guess not... Still looking for it.
But, the generals of it were...
The wall outlets were connected down the length of an extension cord. This cord is then plugged into one of two wall outlets that one is connected to external power/generator, and the other is the internal inverter.
When you want to run off your genny, you just switch the cord over to the Gen Plug, when you want inverted battery power, switch to its plug. It guarantees that you cant have both external and internal power sources working at the same time, just as you want.
Someone will post a better description and probably the pics that I am having trouble finding.