ProfilePVICollectionAddPVI Method

Adds an Autodesk.Civil.DatabaseServices.ProfilePVI with a type of ProfileEntityType.Tangent to the collection.

Namespace: Autodesk.Civil.DatabaseServices
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
Syntax
public ProfilePVI AddPVI(
	double station,
	double elevation
)

Parameters

station  Double
Station value for the new PVI.
elevation  Double
Elevation value for the new PVI.

Return Value

ProfilePVI
Exceptions
ExceptionCondition
ArgumentException Thrown when the value of the new PVI station is less than the start station or greater than the end station of the profile's parent alignment.
Remarks
The value of station is limited by the profile view in the UI, but it's not limited in the API.
Example
C#
1//  Find the PVI close to station 1000 elevation -70.
2ProfilePVI oProfilePVI = oProfile.PVIs.GetPVIAt(1000, -70);
3ed.WriteMessage("PVI closest to station 1000 is at station: {0}", oProfilePVI.Station);
4// Add another PVI and slightly adjust its elevation.
5oProfilePVI = oProfile.PVIs.AddPVI(607.4, -64.3);
6oProfilePVI.Elevation -= 2.0;
See Also