Set the workplane to Ref. Level. In Revit place two orthogonal vertical reference planes and constrain them to existing geometry. We are going to use a vertical corner edge of the door to rotate the door about, so define the hinge point to coincide with the door side offset.
A variable is assigned to the door panel side offset in Revit.

The door hinge side offset is assigned a calculated variable:
(dh_so) = (dj1_m_w) – (dj1_r_w) + (dp_so)

Create and name the reference plane. Assign (dh_so) as a label to the defining dimension

The door hinge face offset is assigned a calculated variable:
(dh_fo) = (dj1_m_d)

Create the second vertical hinge plane orthogonal to the first and assign (dh_fo) as a label to the defining dimension

The hinge position is now flexing with the door. A reference line is drawn and constrained as follows (it will eventually coincide with the interior face of the door panel)

Create a locked parameter of zero length.

Create an aligned linear dimension from the endpoint of the reference line closest to the hinge point. During the dimension command, when selecting the endpoint, hover over it and press Tab repeatedly until a point is obtained to snap to

, then select one of the hinge axes to dimension to. Assign the zero length parameter to it. Notice that the dimension does not update to this zero value. We will fix this shortly. Create another dimension orthogonal to the first and also assign the zero length parameter to it. Again note that it does not update automatically to zero value.

Open the dialogue and click apply to finally update the dimensions to their correct zero value.

Now the dimensions have been updated, as shown below.

Define a door opening angle parameter.

Assign the Door Opening Parameter to the reference line using an angular dimension. Define it an instance parameter so that each door instance is be opened and closed individually.

Were the door panel extruded (the extrusion profile constrained to the rotatable reference line), the door would be functional. However, if one were to import a door panel as a family and then try to constrain it one would run into trouble. A simple extrusion would never suffice were an interior decorator to model custom doors to show his clients! We will investigate both these cases.