AlignmentCreate(CivilDocument, PolylineOptions, String, String, String, String, String) Method |
Creates an Alignment from the specified Polyline, Polyline2d or Polyline3d.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
Syntaxpublic static ObjectId Create(
CivilDocument document,
PolylineOptions plineOptions,
string alignmentName,
string siteName,
string layerName,
string styleName,
string labelSetName
)
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
public:
static ObjectId Create(
CivilDocument^ document,
PolylineOptions plineOptions,
String^ alignmentName,
String^ siteName,
String^ layerName,
String^ styleName,
String^ labelSetName
)
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.
- siteName String
- Name of the site on which Alignment is created. Pass null to create a
siteless alignment.
- layerName String
- Name of the layer on which the Alignment is created.
- styleName String
- Name of the style applied to the created Alignment.
- labelSetName String
- Name of the labelSet applied to the created Alignment.
Return Value
ObjectId
ExceptionsException | Condition |
---|
ArgumentException |
Thrown when:
- The the name of the drawing, layer, style, labelSet or site is invalid.
- The name of the alignment already exists.
|
Remarks
This method creates an Alignment using string parameters. Use an null or empty site name for a siteless Alignment.
Example 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");
See Also