Sets the Alignment and Profile objects associated with this baseline.

Namespace: Autodesk.Civil.DatabaseServices
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 10.3.488.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.

Exceptions

ExceptionCondition
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