I've run into a problem when trying to change a ProfilePVI.Elevation property. If the value is > 0 then there is no problem. If the value is <= 0 then the following exception is thrown:
'System.ArgumentOutOfRangeException' occurred in AeccDbMgd.dll
This is for 2012 and 2011. Haven't tried 2013 yet.
I would provide sample code but there really isn't much to show.
pvi.Elevation = 2; //good
pvi.Elevation = 0.0000000000001; //good
pvi.Elevation = 0; //error
pvi.Elevation = -1; //error
Also, here is a bit of code from the reference guide which clearly shows negative elevations but I am seeing the above errors. Thanks for any insights.
On a related note, I'm noticing that ProfilePVI.Station cannot be set if it falls before or after the horizontal alignment geometry either. It simply outputs a message box error stating "Station xxx.xxx: Either outside of alignment limits, or within gap created by a station equation." The message is correct in that the PVI is outside the alignment limits, but if it was already outside those limits why the restriction now when attempting to change it?
Manually making changes through the Panorama grid doesn't run into any of these problems. Is there something I'm overlooking in the API?