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: 

C3D to EXCEL and back!!

11 REPLIES 11
Reply
Message 1 of 12
talvasconcelos
845 Views, 11 Replies

C3D to EXCEL and back!!

Hi , i've been cracking my head with a VBA from Radomir Lazic (that i downloaded from Autodesk University), called PIPE2EXCEL.The VBa was designed for C3D 2006 i think i'm using 2008 now, i can't get the VBA to work perfectly.
Anyway do you guys know any lisp, vba, command, etc... that can export my pipe data to an excel sheet, that i can play with values and then export that information back to C3D?

Thanks in advance...

Tiago Vasconcelos
11 REPLIES 11
Message 2 of 12
Anonymous
in reply to: talvasconcelos

The attachment doesn't show in OutlookExpress, the size of the message
indicates an attachment but the message itself does not.


wrote in message news:5704616@discussion.autodesk.com...
Hi , i've been cracking my head with a VBA from Radomir Lazic (that i
downloaded from Autodesk University), called PIPE2EXCEL.The VBa was designed
for C3D 2006 i think i'm using 2008 now, i can't get the VBA to work
perfectl
Message 3 of 12
Anonymous
in reply to: talvasconcelos

I will try to transfer this to you Jeff:

Bill

"Jeff Mishler" wrote in message
news:5704644@discussion.autodesk.com...
The attachment doesn't show in OutlookExpress, the size of the message
indicates an attachment but the message itself does not.


wrote in message news:5704616@discussion.autodesk.com...
Hi , i've been cracking my head with a VBA from Radomir Lazic (that i
downloaded from Autodesk University), called PIPE2EXCEL.The VBa was designed
for C3D 2006 i think i'm using 2008 now, i can't get the VBA to work
perfectl
Message 4 of 12
Anonymous
in reply to: talvasconcelos

Thanks, Bill. Came through just fine.

"wfb" wrote in message
news:5704744@discussion.autodesk.com...
I will try to transfer this to you Jeff:

Bill
Message 5 of 12
Anonymous
in reply to: talvasconcelos

Jeff:

I forgot to mention, it wasn't in my OE either. I went over to the Dark
Side and got it.


Bill

"Jeff Mishler" wrote in message
news:5704797@discussion.autodesk.com...
Thanks, Bill. Came through just fine.

"wfb" wrote in message
news:5704744@discussion.autodesk.com...
I will try to transfer this to you Jeff:

Bill
Message 6 of 12
Anonymous
in reply to: talvasconcelos

A few things.....
The DVB expects Excel2003 to be available. If you have another version you
will need to change the Reference from the Excel 11.0 to whatever one you do
have.

The references for Aecc* must be removed.
Add references to the Autodesk Civil Engineering Land, Pipe, UILand & UIPipe
(4 different items)

The DVB also expects the Excel file to be in a specific location:
"C:\P2X\VBAS strmsew-metr.xls"

To set the correct References, Load the DVB, Invoke the VBAIDE, on the
menubar select Tools, then References. In the form that comes up, deselect
all of the ones that are currently selected which start with "Aecc....". If
you have a different Excel, the Excel reference will start out with
"MISSING:", so deselect it. Now browse down to the correct references I
described above and select them.

That should get you running.

Jeff

wrote in message news:5704616@discussion.autodesk.com...
Hi , i've been cracking my head with a VBA from Radomir Lazic (that i
downloaded from Autodesk University), called PIPE2EXCEL.The VBa was designed
for C3D 2006 i think i'm using 2008 now, i can't get the VBA to work
perfectl
Message 7 of 12
Anonymous
in reply to: talvasconcelos

I was going to but you beat me to it. 🙂 Thanks!

"wfb" wrote in message
news:5704830@discussion.autodesk.com...
Jeff:

I forgot to mention, it wasn't in my OE either. I went over to the Dark
Side and got it.


Bill

"Jeff Mishler" wrote in message
news:5704797@discussion.autodesk.com...
Thanks, Bill. Came through just fine.

"wfb" wrote in message
news:5704744@discussion.autodesk.com...
I will try to transfer this to you Jeff:

Bill
Message 8 of 12

Thanks for your replies, my doubt is there...i allready had gone to VBAIDE, to references and loaded the Libraries needed, i also had some stuff from C3D 2007 that i unloaded, then uninstalled it, since i have 2008 now.When i try to export to Excel it sends me to debug and shows a message that there's an error with the library file and shows me that the C3D 2007 Libs are missing.I don't know VBasic, i can read what the program is doing and understand a litlle how is funcioning, i had in school QBasic and Pascal so i have some pointers in programming but they don't serve much in VB.So:

Function GetCivilObjects()
' Function to set up the Civil 3D application, document and database object
Dim AeccApp As AeccApplication
Set AeccApp = ThisDrawing.Application.GetInterfaceObject("AeccXUILand.AeccApplication")
Dim sAppName As String
sAppName = "AeccXUiLand.AeccApplication"
Set g_oCivilApp = oApp.GetInterfaceObject(sAppName)
If g_oCivilApp Is Nothing Then
MsgBox "Error creating " & sAppName & ", exit."
GetCivilObjects = False
Exit Function
End If
Set g_oAeccDoc = g_oCivilApp.ActiveDocument
Set g_oAeccDb = g_oAeccDoc.Database
End Function

Function GetPipeObjects()
' Function to set up the Civil 3D Pipe application, document and database object
' NOTE: use the pipe application to get the pipe settings
Dim oApp As AcadApplication
Set oApp = ThisDrawing.Application
Dim sAppName As String
sAppName = "AeccXUiPipe.AeccPipeApplication"
Set g_oCivilPipeApp = oApp.GetInterfaceObject(sAppName)
If g_oCivilPipeApp Is Nothing Then
MsgBox "Error creating " & sAppName & ", exit."
GetCivilObjects = False
Exit Function
End If
Set g_oAeccPipeDoc = g_oCivilPipeApp.ActiveDocument
Set g_oAeccPipeDb = g_oAeccPipeDoc.Database

End Function

the VB shows me an error at this point, the pdf that comes with the dvb file says what you said about loading the libs, and then to get the Civil application object and the pipe app object as:
dim aeccapp as aeccapplication
set aeccapp=thisdrawing.application.getinterfaceobject("aeccxuiland.aeccapplication")
for the Civil 3D Application Object, and:
dim aeccpipeapp as aeccpipeapplication
set aeccpipeapp=thisdrawing.application.getinterfaceobject("aeccxuipipe.aeccpipeapplication")

I don't know where to put this at the piece of coding i posted above, and if you could try to explain to me what the programing is doing in each line of code i would appreciate it, is he defining variables, setting them to libraries, etc...

Thanks in advance, and sorry for beeing such a noob in this,

Tiago Vasconcelos Message was edited by: tvasconcelos
Message 9 of 12
Anonymous
in reply to: talvasconcelos

Hi Tiago,
These 2 Functions worked for me in 2008. I have both 2007 & 2008 installed
which necessitates adding the version number to the Application string.
Provided you've set the correct references this should work for you, too.
These really don't do much, other than load the ActiveX (COM) API for both
the core Civil Application and the Pipe Application.

Yes, these are setting Global variables that hold the Civil & Pipe
application, Document, & Database objects.

Good Luck! And feel free to keep asking questions.

Function GetCivilObjects()
' Function to set up the Civil 3D application, document and database object
Dim oApp As AcadApplication
Set oApp = ThisDrawing.Application
Dim sAppName As String
sAppName = "AeccXUiLand.AeccApplication.5.0"
Set g_oCivilApp = oApp.GetInterfaceObject(sAppName)
If g_oCivilApp Is Nothing Then
MsgBox "Error creating " & sAppName & ", exit."
GetCivilObjects = False
Exit Function
End If
Set g_oAeccDoc = g_oCivilApp.ActiveDocument
Set g_oAeccDb = g_oAeccDoc.Database
End Function

Function GetPipeObjects()
' Function to set up the Civil 3D Pipe application, document and database
object
' NOTE: use the pipe application to get the pipe settings
Dim oApp As AcadApplication
Set oApp = ThisDrawing.Application
Dim sAppName As String
sAppName = "AeccXUiPipe.AeccPipeApplication.5.0"
Set g_oCivilPipeApp = oApp.GetInterfaceObject(sAppName)
If g_oCivilPipeApp Is Nothing Then
MsgBox "Error creating " & sAppName & ", exit."
GetCivilObjects = False
Exit Function
End If
Set g_oAeccPipeDoc = g_oCivilPipeApp.ActiveDocument
Set g_oAeccPipeDb = g_oAeccPipeDoc.Database

End Function

wrote in message news:5705535@discussion.autodesk.com...
Thanks for your replies, my doubt is there...i allready had gone to VBAIDE,
to references and loaded the Libraries needed, i also had some stuff from
C3D 2007 that i unloaded, then uninstalled it, since i have 2008 now.When i
try to export to Excel it sends me to debug and shows a message that there's
an error with the library file and shows me that the C3D 2007 Libs are
missing.I don't know VBasic, i can read what the program is doing and
understand a litlle how is funcioning, i had in school QBasic and Pascal so
i have some pointers in programming but they don't serve much in VB.So:
and if you could try to explain to me what the programing is doing in each
line of code i would appreciate it, is he defining variables, setting them
to libraries, etc...

Thanks in advance, and sorry for beeing such a noob in this,

Tiago Vasconcelos

Message was edited by: tvasconcelos
Message 10 of 12

Thanks guys, it worked like a charm...i just have to adjust the excel sheet for my needs...
Message 11 of 12
Thaabit.Isaacs
in reply to: Anonymous

Hi Guys

 i was just wondering if anyone converted this little app for the latest versions?

i have c3d 2015 and am struggling to make this app run.

im not much of a programmeer but any help would be much appreciated

 

thanks in advance

Message 12 of 12

You might want to check out a third party app that updates their program every year. I know RSteltman tools has one that does what this does as well as let you modify custom properties. There might be some other ones as well.

Civil Reminders
http://blog.civil3dreminders.com/
http://www.CivilReminders.com/
Alumni

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report