AlignmentCreate(CivilDocument, PolylineOptions, String, ObjectId, ObjectId, ObjectId, ObjectId) Method

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

Namespace: Autodesk.Civil.DatabaseServices
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.7.0.1190
Syntax
public static ObjectId Create(
	CivilDocument document,
	PolylineOptions plineOptions,
	string alignmentName,
	ObjectId siteId,
	ObjectId layerId,
	ObjectId styleId,
	ObjectId labelSetId
)

Parameters

document  CivilDocument
Document object in which the Alignment is created.
plineOptions  PolylineOptions
Polyline options for creating the Alignment, including whether to add curves between tangents, and whether to erase the original polyline.
alignmentName  String
Name of the created Alignment.
siteId  ObjectId
ObjectId of the site on which the Alignment is created. Pass null to create a siteless alignment.
layerId  ObjectId
ObjectId of the layer on which the Alignment is created.
styleId  ObjectId
ObjectId of the style applied to the created Alignment.
labelSetId  ObjectId
ObjectId of the labelSet applied to the created Alignment.

Return Value

ObjectId
Exceptions
ExceptionCondition
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.
Remarks
This method creates an Alignment using ObjectId parameters. Use an ObjectId.NULL for a siteless Alignment.
See Also