Creates an Alignment from the specified Polyline, Polyline2d or Polyline3d.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.4.2516.0
Syntax
C# |
---|
public static ObjectId Create(
CivilDocument document,
PolylineOptions plineOptions,
string alignmentName,
string siteName,
string layerName,
string styleName,
string labelSetName
) |
Visual Basic |
---|
Public Shared Function Create ( _
document As CivilDocument, _
plineOptions As PolylineOptions, _
alignmentName As String, _
siteName As String, _
layerName As String, _
styleName As String, _
labelSetName As String _
) As ObjectId |
Visual C++ |
---|
public:
static ObjectId Create(
CivilDocument^ document,
PolylineOptions plineOptions,
String^ alignmentName,
String^ siteName,
String^ layerName,
String^ styleName,
String^ labelSetName
) |
Parameters
- document
- Type: Autodesk.Civil.ApplicationServices..::..CivilDocument
Document object in which the Alignment is created.
- plineOptions
- Type: Autodesk.Civil.DatabaseServices..::..PolylineOptions
Polyline options for creating the Alignment, including whether to add curves between
tangents, and whether to erase the original polyline.
- alignmentName
- Type: System..::..String
Name of the created Alignment.
- siteName
- Type: System..::..String
Name of the site on which Alignment is created. Pass null to create a
siteless alignment.
- layerName
- Type: System..::..String
Name of the layer on which the Alignment is created.
- styleName
- Type: System..::..String
Name of the style applied to the created Alignment.
- labelSetName
- Type: System..::..String
Name of the labelSet applied to the created Alignment.
Remarks
Examples
CopyC#
1
2PolylineOptions plops = new PolylineOptions();
3plops.AddCurvesBetweenTangents = true;
4plops.EraseExistingEntities = true;
5plops.PlineId = res.ObjectId;
6
7
8
9
10ObjectId testAlignmentID = Alignment.Create(doc, plops, "New Alignment", null, "0", "Standard", "Standard");
Exceptions
Exception | Condition |
---|
System..::..ArgumentException |
Thrown when:
- The the name of the drawing, layer, style, labelSet or site is invalid.
- The name of the alignment already exists.
|
See Also