Sets the Alignment and Profile objects associated with this baseline.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.4.2516.0
Syntax
C# |
---|
public void SetAlignmentAndProfile( ObjectId alignmentId, ObjectId profileId ) |
Visual Basic |
---|
Public Sub SetAlignmentAndProfile ( _ alignmentId As ObjectId, _ profileId As ObjectId _ ) |
Visual C++ |
---|
public: void SetAlignmentAndProfile( ObjectId alignmentId, ObjectId profileId ) |
Parameters
- alignmentId
- Type: ObjectId
ObjectId of an Alignment object.
- profileId
- Type: ObjectId
ObjectId of a Profile object associated with the specified Alignment.
Remarks
This method requires to specify the Alignment and Profile objects for
a baseline simultaneously. The reason is because the associated Profile has to
also be associated with the specified Alignment object. Changing the Alignment
will require a change in the Profile, and specifying them individually may leave
the baseline object in an invalid state.
But if it is a feature line based corridor, it will fail to set the alignment and profile, and throws an exception whose description is "This operation on feature line based baseline is invalid".
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentException | This exception is raised if the specified alignmentId does not point to an Alignment object. The exception is also raised if the specified profileId does not point to a valid Profile object. It will also be raised if either the specified alignmentId or profileId are not resident in the same Database (drawing) than the baseline. Finally, the exception will also be raised if the specified profileId is not associated with the Alignment specified through the alignmentId. |
See Also
Alignment class
Profile class