AutoCAD Civil 3D General Discussion

Reply
Valued Contributor
RCBmstg007
Posts: 53
Registered: ‎09-08-2006
Message 1 of 2 (234 Views)

PipeDataExcel.cs

234 Views, 1 Replies
09-05-2013 01:45 PM

I have been reading alittle up on this Civil 3D API, but I know nothing really about it.

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

PipeDataExcel.cs
PipeDataExport.csproj
AssemblyInfo.cs

//
// (C) Copyright 2010 by Autodesk, Inc.
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided that the above copyright notice appears in all copies and
// that both that copyright notice and the limited warranty and
// restricted rights notice below appear in all supporting
// documentation.
//
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE.  AUTODESK, INC.
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
// UNINTERRUPTED OR ERROR FREE.
//
// Use, duplication, or disclosure by the U.S. Government is subject to
// restrictions set forth in FAR 52.227-19 (Commercial Computer
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
// (Rights in Technical Data and Computer Software), as applicable.
//
///////////////////////////////////////////////////////////////////////////////

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.







Does anyone have an idea how to use this? I am want to use civil 3d export pipes to excel, then update the network from the excel changes.

Thanks for your thoughts!

*Expert Elite*
mikeevans
Posts: 752
Registered: ‎09-29-2008
Message 2 of 2 (211 Views)

Re: PipeDataExcel.cs

09-06-2013 05:33 AM in reply to: RCBmstg007

You really need to download Visual Studio Express for visual basic .net then open the compiled project in that.

 

I have used this code extract to add functionality to the import / export so that you can swap sizes, parts levels and edit optional data tags in one hit after editing it in excel.

 

Obviously you have no experience with .net or programing but don't let that put you off. There are many good tutorials and learning docs about that will help you out.

 

I sudgest you look at the following.

Tutorials in the autodesk docs, developer information.

Civil3d Reminders blog, Infrastructure Modelling blog & between the lines and many other blogs such as kean's.

AutoDesk University.

 

Once you have a basic understanding play about to figure out what you can and can't do. Refer to customisation forum.

 

Mike Evans

Civil3D 2013 / 2014 British UK
Windows 7 Professional 64-bit
Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz (8 CPUs), ~4.0GHz With 32768MB RAM, AMD FirePro V4900, Dedicated Memory: 984 MB, Shared Memory: 814 MB

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
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

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