Share

ProfilePVICollection.AddPVI 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.280

Syntax

C#

public ProfilePVI AddPVI(
	double station,
	double elevation
)

VB

Public Function AddPVI ( 
	station As Double,
	elevation As Double
) As ProfilePVI

C++

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

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

Reference

Was this information helpful?