The more I think about it, the more questions I find....
For an orthogonal rectangle, do you want always the left and top edges dimensioned as in the image? If at other angles, what should be the criteria for which two adjacent edges are dimensioned?
What should be the distance of the dimension lines from the rectangle edges? That varies significantly in your image -- is there some reason for the differences?
Should it simply use whatever the current Dimension Style and Layer are, or should settings of those things be built in?
Meanwhile, there are routines out there that will do all edges, such as DimPoly.lsp, >here<, which defines a DPO command to do them on the Outside. It might be easier to just adjust that to do only two edges, but that could depend on the answers to the questions.
Kent Cooper, AIA