Creates an Alignment without geometry information.

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

Syntax

C#
public static ObjectId Create(
	CivilDocument document,
	string alignmentName,
	string siteName,
	string layerName,
	string styleName,
	string labelSetName
)
Visual Basic
Public Shared Function Create ( _
	document As CivilDocument, _
	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, 
	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.
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

This method creates an Alignment using string parameters. Use an empty site name for a siteless Alignment.

Examples

CopyC#
1// Uses an existing Alignment Style and Label Set Style named "Standard" (for example, from
2// the Civil 3D (Imperial) NCS.dwt template.  This call will fail if the named styles
3// don't exist.  
4// Uses layer 0, and no site (null)
5ObjectId testAlignmentID = Alignment.Create( doc, "New Alignment", null, "0", "Standard", "Standard");

Exceptions

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

See Also