Click or drag to resize

RectangleConverterToRectangle Method (Rectangle)

Converts the specified Autodesk.Revit.DB.Rectangle to an equivalent Rectangle.

Namespace:  RhinoInside.Revit.Convert.System.Drawing
Assembly:  RhinoInside.Revit (in RhinoInside.Revit.dll) Version: 1.7.8130
Syntax
public static Rectangle ToRectangle(
	this Autodesk.Revit.DB.Rectangle rectangle
)

Parameters

rectangle
Type: Autodesk.Revit.DB.Rectangle
System rectangle to convert.

Return Value

Type: Rectangle
Revit rectangle that is equivalent to the provided System rectangle.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Autodesk.Revit.DB.Rectangle. 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 ToRectangle(Rectangle) as extension method:
using System.Drawing;
using DB = Autodesk.Revit.DB;
using RhinoInside.Revit.Convert.System.Drawing;

Rectangle rectangle = revitRectangle.ToRectangle();
Using ToRectangle(Rectangle) as static method:
using System.Drawing;
using DB = Autodesk.Revit.DB;
using RhinoInside.Revit.Convert.System.Drawing;

Rectangle rectangle = RectangleConverter.ToRectangle(revitRectangle)
See Also