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: 

Create TINSurface from contour polylines using Civil 2010 API

3 REPLIES 3
Reply
Message 1 of 4
DJB_CADfx
446 Views, 3 Replies

Create TINSurface from contour polylines using Civil 2010 API

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

3 REPLIES 3
Message 2 of 4
Jeff_M
in reply to: DJB_CADfx

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.

 

 

Jeff_M, also a frequent Swamper
EESignature
Message 3 of 4
Anonymous
in reply to: DJB_CADfx

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

Message 4 of 4
Anonymous
in reply to: Anonymous

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 :

 

  • civil_api_developers_guide.chm
  • civil_api_activex_reference.chm

 

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.

 

http://docs.autodesk.com/CIV3D/2014/ENU/API_Reference_Guide/html/0a7ff05c-6621-28b5-f429-3c48db395a9...

 

Hope this helps.

 

Thanks,

Partha

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report