Creates an Alignment from the specified Polyline, Polyline2d or Polyline3d.

Namespace: Autodesk.Civil.DatabaseServices
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 10.3.488.0

Syntax

C#
public static ObjectId Create(
	CivilDocument document,
	PolylineOptions plineOptions,
	string alignmentName,
	ObjectId siteId,
	ObjectId layerId,
	ObjectId styleId,
	ObjectId labelSetId
)
Visual Basic
Public Shared Function Create ( _
	document As CivilDocument, _
	plineOptions As PolylineOptions, _
	alignmentName As String, _
	siteId As ObjectId, _
	layerId As ObjectId, _
	styleId As ObjectId, _
	labelSetId As ObjectId _
) As ObjectId
Visual C++
public:
static ObjectId Create(
	CivilDocument^ document, 
	PolylineOptions plineOptions, 
	String^ alignmentName, 
	ObjectId siteId, 
	ObjectId layerId, 
	ObjectId styleId, 
	ObjectId labelSetId
)

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.
siteId
Type: ObjectId
ObjectId of the site on which the Alignment is created. Pass null to create a siteless alignment.
layerId
Type: ObjectId
ObjectId of the layer on which the Alignment is created.
styleId
Type: ObjectId
ObjectId of the style applied to the created Alignment.
labelSetId
Type: ObjectId
ObjectId of the labelSet applied to the created Alignment.

Remarks

This method creates an Alignment using ObjectId parameters. Use an ObjectId.NULL for a siteless Alignment.

Exceptions

ExceptionCondition
System..::..ArgumentException Thrown when:
  1. the name of the drawing or the ObjectId of the polyline, layer, style, labelSet or site are invalid.
  2. The name of the alignment already exists.

See Also