How can I place a diagonal dimension between these markers in 3D and not Ortho?

I made this script a while back, maybe it’s useful for you:

#! python3
def mark_distance():
    """
    script written by Gijs de Zwart
    draws a line with arrows and dot annotation with the distance between the
    two picked points
    """
    import Rhino
    import rhinoscriptsyntax as rs
    import scriptcontext as sc
    
    
    result = rs.GetLine(0,message1 = "pick two points")
    if not result:
        return
    else:
        pt1, pt2 = result
    if not pt1 or not pt2:
        return
        
    
    line  = Rhino.Geometry.Line(pt1, pt2)
    length = round(line.Length,3)
    
    mid = (pt1+pt2)/2
    
    
    rs.EnableRedraw(False)
    newline = sc.doc.Objects.AddLine(line)
    rs.CurveArrows(newline,3)
    obj = sc.doc.Objects.Find(newline)
    obj.Attributes.DisplayOrder=1
    obj.CommitChanges()
    
    dot = rs.AddTextDot(str(length),mid)
    obj = sc.doc.Objects.Find(dot)
    obj.Attributes.DisplayOrder=2
    obj.CommitChanges()
    groupname = rs.AddGroup("dim-3d : "+str(length))
    rs.AddObjectsToGroup([newline, dot],groupname)
    rs.EnableRedraw(True)
    sc.doc.Views.Redraw()
if __name__ == "__main__":  
    mark_distance()

or download:
mark_distance.py (1.1 KB)

and use: