How can I show one 2d representation and a different 3d representation in Revit?

Thanks for your file. From my tests it seems as though the behaviour is a little specific to your situation of a door filling up an opening element. If the door doesn’t fill the opening element, or if you swap the footprint to the wall object itself, your example ceases to work.

I ran my own tests of three building element proxies. From left to right first there is an object which has both a Model Body representation (cube) and a Plan Footprint representation (thin rectangle), the second object is purely a Model Body representation (common case), and the third is purely a Plan Footprint representation. In Revit, in 3D, we see all representations:

In plan view (and I have been able to consistently reproduce this with different objects and scenarios e.g. subcontext vs context assignment, curve 2d vs curve 3d), we see this: if an object has both model and plan, both are shown. If an object is just a model, it is shown. If a model is just a plan, somewhat unexpectedly, nothing displays. This is the opposite of what you have managed to achieve with your door and opening element.

I have attached my test file here:

context.ifc (10.7 KB)