AutoCAD Civil 3D Customization
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Extract Sampled Cross Sections into a text file
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
HI,
I want to extract sampled sections to a text file like "Station,Offset,Elevation" by C#.net
Something like tplate output in land companion,
wich functons should I have access to do above?
Re: Extract Sampled Cross Sections into a text file
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi Seyyed,
I don't see any public function available in Civil 3d .net Section object to extract these details at the moment.
FYI - Section object is not yet fully exposed in .NET API.
Did you check the following API (Civil 3D COM ) ?
IAeccSampleLineVertex:: Location Property -> Gets or sets the 3D point location for the sample line vertex.
IAeccSection:: ElevationAt Method -> Gets the cross section elevation at a specified offset.
IAeccSection:: Station Property -> Gets the cross section station distance.
I am not familiar with 'tplate output in land companion'; if this is sampling the surface along a line, then you could see the following blog post with code sample useful to you -
Using SampleElevations() in AutoCAD Civil 3D 2013 .NET API
http://adndevblog.typepad.com/infrastructure/2012/
Want to use only StartPoint and EndPoint as input to .NET API SampleElevations()?
http://adndevblog.typepad.com/infrastructure/2012/
Does it help ?
Partha Sarkar
Developer Technical Services
Autodesk Developer Network
Re: Extract Sampled Cross Sections into a text file
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
ParthaPS wrote:
I don't see any public function available in Civil 3d .net Section object to extract these details at the moment.
I am not familiar with 'tplate output in land companion'; if this is sampling the surface along a line, then you could see the following blog post with code sample useful to you -
Partha, the template in LDT was essentailly the Assembly in C3D, so I think they want to get the design data.
Seyyed, I don't have time to test this, but it looks like you can use the .net API in 2012 & 2013 (maybe earlier versions as well, I haven't looked). You will need to get the sections via the Alignment, SampleLineGroup, SampleLine, Sections, Section, SectionPoints. The section points returns a collection Point3d object which you can then use the Alignment's StationOffset() method.
Re: Extract Sampled Cross Sections into a text file
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Or maybe you just need to run the Corridor SectionPoints report and save it as an Excel file?
Re: Extract Sampled Cross Sections into a text file
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
HI,
Thank you partha,Jeff_M
I'm starting C3D programing about two weeks.
I want ground point data, In LDT in cross section menu we have a command that give us a file (attached.)
Because our company uses a Local software for analyzing Profiles sections and Volumes, we need to import ground sections to it.
So when we migrated to C3D I didnt have an option, then I used landXml and export the project to landxml and importing it to LDT for my purpose.
sorry for my poor english
<script id="__changoScript" type="text/javascript">// var __chd__ = {'aid':11079,'chaid':'www_objectify_ca'};(function
Re: Extract Sampled Cross Sections into a text file
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I would either use the Corridor "Section Points Report" and save the results as a text file, or look at the source code for the Corridor Section Points Report's source code that ships with Civil 3D to see how we extract the data from the corridor model. If you are also looking at existing ground points, there are a bunch of examples on how to extract ground points between two points.
Regards,
Peter Funk
Autodesk, Inc.

Peter Funk
Autodesk, Inc.

