I've found a fair amount of API documentation and help for Civil 2014, but very little for the Civil 2010 API. I'm trying to create a TINSurface using existing contour polylines in a drawing with the 2010 API. (I think I've figured out how to do this with the 2014 API, but none of those methods are available in the 2010 API.)
Does anyone know how to accomplish this using the Civil 2010 API?
The ultimate goal is to create a a TINSurface from existing contour lines. Then create a grid over the entire surface and for each cell in the grid create a flat surface at 0 elevation. Use those 2 surfaces to create a SurfaceVolume and calculate the average elevation from each cell's SurfaceVolume object. Can this be done with the Civil 2010 API?
Thanks,
Dave Blackburn
For versions prior to 2012 you must use the COM Interops. Here is the page for the base Surface class. Dig down through here to get to the Tin & Grid surfaces. http://docs.autodesk.com/CIV3D/2012/ENU/API_Reference_Guide/com/AeccXLandLib__AeccSurfaces.htm I believe that the 2010 API help is actually installed with the normal help.
Hi,
Please note that, Civil 3D Surface .NET API was not exposed in 2010 release. So if you are using Civil 3D 2010, you will have to use COM interop. You will see samples using COM interop in our ADN DevBlog :
http://adndevblog.typepad.com/infrastructure/
And some relevant videos :
http://www.youtube.com/watch?v=EVQ6chwzbhM
Thanks,
Partha
Hi Dave,
This is further to my earlier post.
If you have Civil 3D 2010 installed in your machine, you will see the following Civil 3D API Developer Guide and API Ref doc in the help folder :
You could try using the following COM API -
IAeccSurfaceContours:: Add() -> Creates a new surface contour initialized using the given arguments, adds it to the collection, and returns an instance of the new object.
IAeccTinSurfaceDefinitionProperties:: UseContourData
If you are looking for a sample code on using Civil 3D COM API in .NET application using Interop, you can refer to the following :
http://adndevblog.typepad.com/infrastructure/2012/12/creating-a-tin-surface-from-landxml-file.html
http://adndevblog.typepad.com/infrastructure/2012/07/mixing-civil-3d-net-and-com-apis.html
And here are some links specific to Civil 3D 2014 Surface .NET API to complete your task (if you consider to use Civil 3D 2014 ) :
SurfaceDefinitionContours.AddContours() - > Adds contours to a surface from entities in an ObjectIdCollection.
Hope this helps.
Thanks,
Partha