Click or drag to resize

GeometryEncoderToPolyLine Method

Converts the specified Rhino.Geometry.Polyline to an equivalent of Autodesk.Revit.DB.PolyLine.

Namespace:  RhinoInside.Revit.Convert.Geometry
Assembly:  RhinoInside.Revit (in RhinoInside.Revit.dll) Version: 1.7.8130
Syntax
public static Autodesk.Revit.DB.PolyLine ToPolyLine(
	this Rhino.Geometry.Polyline polyline
)

Parameters

polyline
Type: Rhino.Geometry.Polyline
Rhino polyline to convert.

Return Value

Type: Autodesk.Revit.DB.PolyLine
Revit polyline that is equivalent to the provided Rhino polyline.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Rhino.Geometry.Polyline. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Examples
Using ToPolyLine(Polyline) as extension method:
using DB = Autodesk.Revit.DB;
using RhinoInside.Revit.Convert.Geometry;

DB.PolyLine revitPolyLine = rhinoPolyLine.ToPolyLine();
Using ToPolyLine(Polyline) as static method:
using DB = Autodesk.Revit.DB;
using RhinoInside.Revit.Convert.Geometry;

DB.PolyLine revitPolyLine = GeometryEncoder.ToPolyLine(rhinoPolyLine);
See Also