I'd like my macro to prompt the user to select a pipe network that I will then export to excel. How is this possible to achieve?
I'd like my macro to prompt the user to select a pipe network >>> Try the following :
Dim oPipe As AeccPipe
Dim objEnt As AcadObject
Dim varPick As Variant
ThisDrawing.Utility.GetEntity objEnt, varPick, "Select a Pipe : "
If TypeOf objEnt Is AeccPipe Then
Set oPipe = objEnt
For Export to Excel, there is a sample code available in the Civil 3D installation folder :
C:\Program Files\Autodesk\AutoCAD Civil 3D 2013\Sample\Civil 3D API\COM\Vba\Pipe
ImportFromExcel - Import Pipes and Structures' data from a Excel file to the current drawing.
ExportToExcel - Export Pipes and Structures' data in a current drawing to a Excel file.
Hope this helps !