Click or drag to resize

RhinoGetGetLinearDimension Method

[Missing <summary> documentation for "M:Rhino.Input.RhinoGet.GetLinearDimension(Rhino.Geometry.LinearDimension@)"]

Namespace:  Rhino.Input
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 5.0
Syntax
public static Result GetLinearDimension(
	out LinearDimension dimension
)

Parameters

dimension
Type: Rhino.GeometryLinearDimension

[Missing <param name="dimension"/> documentation for "M:Rhino.Input.RhinoGet.GetLinearDimension(Rhino.Geometry.LinearDimension@)"]

Return Value

Type: Result

[Missing <returns> documentation for "M:Rhino.Input.RhinoGet.GetLinearDimension(Rhino.Geometry.LinearDimension@)"]

Examples
using System;

partial class Examples
{
  public static Rhino.Commands.Result AddLinearDimension(Rhino.RhinoDoc doc)
  {
    Rhino.Geometry.LinearDimension dimension;
    Rhino.Commands.Result rc = Rhino.Input.RhinoGet.GetLinearDimension(out dimension);
    if (rc == Rhino.Commands.Result.Success && dimension != null)
    {
      if (doc.Objects.AddLinearDimension(dimension) == Guid.Empty)
        rc = Rhino.Commands.Result.Failure;
      else
        doc.Views.Redraw();
    }
    return rc;
  }
}
Python
import Rhino
import scriptcontext
import System.Guid

def AddLinearDimension():
    rc, dimension = Rhino.Input.RhinoGet.GetLinearDimension()
    if rc==Rhino.Commands.Result.Success:
        if scriptcontext.doc.Objects.AddLinearDimension(dimension)==System.Guid.Empty:
            rc = Rhino.Commands.Result.Failure
        else:
            scriptcontext.doc.Views.Redraw()
    return rc


if __name__=="__main__":
    AddLinearDimension()
See Also