GridCreate(Document, Arc) Method |
Creates a new radial grid line.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntaxpublic static Grid Create(
Document document,
Arc arc
)
Public Shared Function Create (
document As Document,
arc As Arc
) As Grid
public:
static Grid^ Create(
Document^ document,
Arc^ arc
)
static member Create :
document : Document *
arc : Arc -> Grid 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 curve.
Return Value
Grid
The newly created grid.
Exceptions
Remarks
The arc should be on a horizontal plane.
Example
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);
Grid arcGrid = Grid.Create(document, geomArc);
if (null == arcGrid)
{
throw new Exception("Create a new curved grid failed.");
}
arcGrid.Name = "New Name2";
See Also