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: 10.3.488.0

Syntax

C#
public ProfilePVI AddPVI(
	double station,
	double elevation
)
Visual Basic
Public Function AddPVI ( _
	station As Double, _
	elevation As Double _
) As ProfilePVI
Visual C++
public:
ProfilePVI^ AddPVI(
	double station, 
	double elevation
)

Parameters

station
Type: System..::..Double
Station value for the new PVI.
elevation
Type: System..::..Double
Elevation value for the new PVI.

Remarks

The value of station is limited by the profile view in the UI, but it's not limited in the API.

Examples

CopyC#
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;

Exceptions

ExceptionCondition
System..::..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.

See Also