Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ProfilePVI.Elevation exception

4 REPLIES 4
Reply
Message 1 of 5
tyronebk
394 Views, 4 Replies

ProfilePVI.Elevation exception

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.

4 REPLIES 4
Message 2 of 5
tyronebk
in reply to: tyronebk

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?

Message 3 of 5
Jeff_M
in reply to: tyronebk


@tkarapita wrote:

 

Manually making changes through the Panorama grid doesn't run into any of these problems. Is there something I'm overlooking in the API?



Yep, I discovered this as well. No way around it that I could find.

Jeff_M, also a frequent Swamper
EESignature
Message 4 of 5
tyronebk
in reply to: Jeff_M

Thanks for the affirmation Jeff. Did you run into it with .net or LISP? I'm wondering if this is just a managed limitation or if it also applies to COM.
Message 5 of 5
Jeff_M
in reply to: tyronebk

It's actaully some older code in my .NET dll based on the COM interops. I found when updating the code to use the managed wrappers that this limitation still applied. 

Jeff_M, also a frequent Swamper
EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report