AutoCAD Civil 3D Customization

AutoCAD Civil 3D Customization

Reply
New Member
Seyyed
Posts: 2
Registered: ‎06-28-2012
Message 1 of 6 (741 Views)

Extract Sampled Cross Sections into a text file

741 Views, 5 Replies
06-28-2012 01:50 AM

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?

ADN Support Specialist
Partha.Sarkar
Posts: 543
Registered: ‎06-09-2009
Message 2 of 6 (710 Views)

Re: Extract Sampled Cross Sections into a text file

07-03-2012 12:08 AM in reply to: Seyyed

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/04/using-sampleelevations-in-autocad-civil-3d-2013... 


Want to use only StartPoint and EndPoint as input to .NET API SampleElevations()?
http://adndevblog.typepad.com/infrastructure/2012/04/want-to-use-only-startpoint-and-endpoint-as-inp... 

 

Does it help ?



Partha Sarkar
Developer Technical Services
Autodesk Developer Network

*Expert Elite*
Jeff_M
Posts: 4,450
Registered: ‎07-22-2003
Message 3 of 6 (701 Views)

Re: Extract Sampled Cross Sections into a text file

07-03-2012 05:10 PM in reply to: Partha.Sarkar

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.

Jeff_M, also a frequent Swamper
*Expert Elite*
Jeff_M
Posts: 4,450
Registered: ‎07-22-2003
Message 4 of 6 (698 Views)

Re: Extract Sampled Cross Sections into a text file

07-03-2012 07:23 PM in reply to: Seyyed

Or maybe you just need to run the Corridor SectionPoints report and save it as an Excel file?

Jeff_M, also a frequent Swamper
New Member
Seyyed
Posts: 2
Registered: ‎06-28-2012
Message 5 of 6 (690 Views)

Re: Extract Sampled Cross Sections into a text file

07-05-2012 06:31 AM in reply to: Seyyed

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() { var c = document.createElement('script'); c.type = 'text/javascript'; c.async = true;c.src=( 'https:' == document.location.protocol ? 'https://z': 'http://p') + '.chango.com/static/c.js'; var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(c, s);})(); // </script>
Employee
peterfunkautodesk
Posts: 720
Registered: ‎08-25-2009
Message 6 of 6 (668 Views)

Re: Extract Sampled Cross Sections into a text file

07-07-2012 06:03 PM in reply to: Seyyed

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.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.