Creates a new linear grid line.
Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Syntax
| Visual Basic |
|---|
Public Function NewGrid ( _
line As Line _
) As Grid |
| Visual C++ |
|---|
public:
Grid^ NewGrid(
Line^ line
) |
Return Value
The newly created grid line.
Remarks
Examples
CopyC#
XYZ start = new XYZ(0, 0, 0);
XYZ end = new XYZ(30, 30, 0);
Line geomLine = Line.CreateBound(start, end);
Grid lineGrid = document.Create.NewGrid(geomLine);
if (null == lineGrid)
{
throw new Exception("Create a new straight grid failed.");
}
lineGrid.Name = "New Name1";
CopyVB.NET
Dim start As New XYZ(0, 0, 0)
Dim [end] As New XYZ(30, 30, 0)
Dim geomLine As Line = Line.CreateBound(start, [end])
Dim lineGrid As Grid = document.Create.NewGrid(geomLine)
If lineGrid Is Nothing Then
Throw New Exception("Create a new straight grid failed.")
End If
lineGrid.Name = "New Name1"
See Also