AutoCAD Civil 3D Customization

Reply
Member
SteadyT
Posts: 5
Registered: ‎12-02-2010
Message 1 of 4 (195 Views)

How to use the Sample API provided in Civil 3D

195 Views, 3 Replies
10-26-2012 02:17 PM

Hi everyone,

 

This is going to seem a very simple question I believe, but I was wondering how I could use on of the sample Civil 3D API that is provided?

 

In particular, I would like to use the ExporttoExcel Sample API provided at the following location during the install:

 

C:\Program Files\Autodesk\AutoCAD Civil 3D 2013\Sample\Civil 3D API\DotNet\CSharp\PipeDataExcel

 

I am not a programmer and can not just load this sample as it is a .cs file.  How would I go about using the code already provided to create a plugin into my AutoCAD to be able to use this command?

 

Thank you to anyone who responds to this.

Ed

 

 

Member
SteadyT
Posts: 5
Registered: ‎12-02-2010
Message 2 of 4 (185 Views)

Re: How to use the Sample API provided in Civil 3D

10-29-2012 08:32 AM in reply to: SteadyT

I'm just bumping this up to the top to see if there is anyone out there that can help me.  Thank you in advance.

Distinguished Mentor
Posts: 729
Registered: ‎07-30-2008
Message 3 of 4 (176 Views)

Re: How to use the Sample API provided in Civil 3D

10-29-2012 08:00 PM in reply to: SteadyT

Try these -

 

The .NET GETTING STARTED topic over at the swamp http://www.theswamp.org/index.php?board=27.0

 

and Kean's getting started blog post here

 

http://through-the-interface.typepad.com/through_the_interface/2006/07/getting_started.html

 

If this fixed your issue, click on "Accept as Solution"

Andrew Puller
Maitland, NSW, Australia
Windows 7 Enterprise 64bit
Intel core i7 2600 @ 3.40 GHz with 16GB Ram
Civil 3d 2013 64bit
ADN Support Specialist
Posts: 537
Registered: ‎06-09-2009
Message 4 of 4 (171 Views)

Re: How to use the Sample API provided in Civil 3D

10-29-2012 09:30 PM in reply to: SteadyT

Hi,

The "ReadMe" file has all the instructions -

 

C:\Program Files\Autodesk\AutoCAD Civil 3D 2013\Sample\Civil 3D API\DotNet\CSharp\PipeDataExcel

-

----------------------------------------------
This samples illustrates how to work with pipe networks and move data to and from MS Excel using COM interop.

 

It defines two commands:
ExportToExcel - exports pipe data to excel
ImportFromExcel - imports the same pipe data from excel, updating the pipe network

 

Building the sample: This project requires two Microsoft Office interop libraries (Microsoft Office 12.0 Object Library, and Excel 12.0 Object Library) installed with Excel, as well as AecBaseMgd, AecDBMgd, AcMgd, and AeccDbMgd.

 

Using the sample: Open a drawing with at least one pipe network and run the ExportToExcel command. 
This exports information about the pipe network pipes and structures to an Excel document. 
Change values as required in the spreadsheet, then run the ImportFromExcel command to apply the
changed values to the open document.
---------------------------------------------------------

You could use VS2010 or Express to build the .NET application using the source code provided in the example. Then use NETLOAD command to load the DLL you built and invoke the custom command.

 

Let me know if you need any further help.

 

Thanks,



Partha Sarkar
Developer Technical Services
Autodesk Developer Network

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Civil 3D Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for AutoCAD Civil 3D helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Civil 3D

Twitter

Facebook

Blogs