@NikWillmore, have you seen this post ?
I’ve tried something with python, eg. make a plane from the 3 input points to create an aligned dimension from two vertically spaced points. Note that this works only if the text point is not on the line between p1 and p2.
import Rhino
import scriptcontext
def AddAlignedDimension(p1, p2, p_text):
plane = Rhino.Geometry.Plane(p1, p2, p_text)
style = scriptcontext.doc.DimStyles.Current
align = Rhino.Geometry.AnnotationType.Aligned
dim = Rhino.Geometry.LinearDimension.Create(
align,
style,
plane,
plane.XAxis,
p1, p2, p_text, 0.0)
scriptcontext.doc.Objects.Add(dim)
scriptcontext.doc.Views.Redraw()
def DoSomething():
if not Rhino.RhinoApp.ExeVersion == 6: return
p1 = Rhino.Geometry.Point3d( 3.0, 3.0, 1.0)
p2 = Rhino.Geometry.Point3d( 8.0, 8.0, 3.0)
p_text = Rhino.Geometry.Point3d( 5.0, 5.0, 0)
AddAlignedDimension(p1, p2, p_text)
DoSomething()
_
c.