Create Method (Document, Line)


Creates a new grid line.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 16.0.0.0 (16.0.0.0)

Syntax

C#
public static Grid Create(
	Document document,
	Line line
)
Visual Basic
Public Shared Function Create ( _
	document As Document, _
	line As Line _
) As Grid
Visual C++
public:
static Grid^ Create(
	Document^ document, 
	Line^ line
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document in which the new instance is created.
line
Type: Autodesk.Revit.DB Line
A line object which represents the location of the grid line.

Return Value

The newly created grid line.

Remarks

The line should be on a horizontal plane.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException document is not a project document. -or- The input line is not on horizontal plane.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL

See Also