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 End If
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 !
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.