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 !
Access a broad range of knowledge to help get the most out of your products and services.
Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.
Upgrading to a 2015 product? Make sure to check these out 1st!