Create Polyline by code


I want to create a polyline with user interaction.

If I create the polyline with the command

Rhino.RhinoApp.RunScript("_polyline", false);

I don’t have the polyline’s reference.

I created Lines with the following function

Line _line = new Line();

if (Rhino.Input.RhinoGet.GetLine(out this._line) == Rhino.Commands.Result.Success)
this._guid = this._documento.Objects.AddLine(this._line, this._atributos);

But I don’t know how create a Polyline from this way

I use c# with Visual Studio 2010 and RhinoCommon Library


Please look at the online documentation here (scroll to the second half to see code samples)

Specifically, you can get some insight from


For more info on the RhinoCommon syntax, see

RhinoCommon should have a Rhino.Input.RhinoGet.GetPolyline, but it does not. Hopefully we can get something add for a future service release.

1 Like

Ok, thanks

This function will be available in SR9.

1 Like