Grid Create(Document, Arc) Method |
Creates a new radial grid line.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)

Parameters
- document Document
- The document in which the new instance is created.
- arc Arc
- An arc object that represents the location of the new grid line.
Return Value
GridThe newly created grid line.

Exception | Condition |
---|---|
ArgumentException | document is not a project document. -or- The input arc is not on horizontal plane. |
ArgumentNullException | A non-optional argument was null |

The arc should be on a horizontal plane.

// Create the geometry arc which the grid locates
XYZ end0 = new XYZ(0, 0, 0);
XYZ end1 = new XYZ(10, 40, 0);
XYZ pointOnCurve = new XYZ(5, 7, 0);
Arc geomArc = Arc.Create(end0, end1, pointOnCurve);
// Create a grid using the geometry arc
Grid arcGrid = Grid.Create(document, geomArc);
if (null == arcGrid)
{
throw new Exception("Create a new curved grid failed.");
}
// Modify the name of the created grid
arcGrid.Name = "New Name2";
