Q: Dimension aligned with bottom of object using ezdxf Needing to add some dimensions along the lower portion of a dxf created with ezdxf for clarity reasons. I used .add_aligned_dim with the points from right to left. This allowed the dimension to be placed underneath the object however, that now means the text is upside down as well. I can't find anywhere in the documentation on how to adjust the text rotation of a dimension line. Any help would be Greatly appreciated. dim5 is the dimension in question.
            # add dimension lines
        dim1 = msp.add_linear_dim(base=(9, 34), p1=(9, 33.4375), p2=(leng2 + 9 - 2.625, 33.4375),
                                  override={'dimexe': 0.25, 'dimdsep': ord('.')},
                                  dxfattribs={"layer": "104"})
        dim1.set_tick(size=0.25)
        dim1.render()
        dim2 = msp.add_linear_dim(base=(9, 36), p1=(9, 33.4375), p2=(leng2 + 9 - 1.125, 33.4375),
                                  override={'dimexe': 0.25, 'dimdsep': ord('.')},
                                  dxfattribs={"layer": "104"})
        dim2.set_tick(size=0.25)
        dim2.render()
        dim3 = msp.add_linear_dim(base=(9, 38), p1=(9, 33.4375), p2=(leng2 + 9, 33.4375),
                                  override={'dimexe': 0.25, 'dimdsep': ord('.')},
                                  dxfattribs={"layer": "104"})
        dim3.set_tick(size=0.25)
        dim3.render()
        dim4 = msp.add_aligned_dim(p1=(8.5, 29), p2=(8.5, 32.9375), distance=0.5,
                                   override={'dimexe': 0.25, 'dimdsep': ord('.')},
                                   dxfattribs={"layer": "104"})
        dim4.set_tick(size=0.25)
        dim4.render()
        dim5 = msp.add_aligned_dim(p1=(10.1250, 28.5), p2=(9, 28.5), distance=0.5,
                                   override={'dimexe': 0.25, 'dimdsep': ord('.')},
                                   dxfattribs={"layer": "104"})
        dim5.set_tick(size=0.25)
        dim5.render()



A: I was actually able to find a work around by offsetting the location I actually wanted to dimension and modifying the extensions.
            # add dimension lines
        dim1 = msp.add_linear_dim(base=(9, 34), p1=(9, 33.4375), p2=(leng2 + 9 - 2.625, 33.4375),
                                  override={'dimexe': 0.25, 'dimdsep': ord('.')},
                                  dxfattribs={"layer": "104"})
        dim1.set_tick(size=0.25)
        dim1.render()
        dim2 = msp.add_linear_dim(base=(9, 36), p1=(9, 33.4375), p2=(leng2 + 9 - 1.125, 33.4375),
                                  override={'dimexe': 0.25, 'dimdsep': ord('.')},
                                  dxfattribs={"layer": "104"})
        dim2.set_tick(size=0.25)
        dim2.render()
        dim3 = msp.add_linear_dim(base=(9, 38), p1=(9, 33.4375), p2=(leng2 + 9, 33.4375),
                                  override={'dimexe': 0.25, 'dimdsep': ord('.')},
                                  dxfattribs={"layer": "104"})
        dim3.set_tick(size=0.25)
        dim3.render()
        dim4 = msp.add_aligned_dim(p1=(8.5, 29), p2=(8.5, 32.9375), distance=0.5,
                                   override={'dimexe': 0.25, 'dimdsep': ord('.')},
                                   dxfattribs={"layer": "104"})
        dim4.set_tick(size=0.25)
        dim4.render()
        dim5 = msp.add_aligned_dim(p1=(9, 26.0), p2=(10.1250, 26.0), distance=0.5,
                                   override={'dimexe': 2.0,
                                   'dimdsep': ord('.')}, dxfattribs={"layer": "104"})
        dim5.set_tick(size=0.25)
        dim5.set_location(location=(-2.0, 0.97), leader=True, relative=True)
        dim5.render()


