Function Syntax: COGOEXPORT Version: 1.0 Date: 24.05.2026 11:55:35 Version: 1.1 Date: 24.05.2026 3:26:16PM N/A Description This AutoLISP routine exports Civil 3D COGO point data from selected Civil 3D point groups to Excel or CSV. The program does not ask the user to select points directly in the drawing. Instead, it requires the user to select one or more Civil 3D point groups from a DCL dialog. The main command is COGOEXPORT. The routine reads the COGO points contained in the selected point groups, extracts selected point properties, and exports the result either to a new Excel workbook or to a timestamped CSV file. This tool is useful for Civil 3D survey exports, point group reporting, QA checking, coordinate review, Excel transfer, project documentation, and production drawing management. Main Command📌 COGOEXPORT — starts the Civil 3D COGO point group export workflow. Loading Method🧰 Load LISP File — load the file CogoPointsExport.lsp in Civil 3D using APPLOAD.📌 Run Command — run COGOEXPORT from the Civil 3D command line. User Workflow🚀 Start Command — the user runs COGOEXPORT.🔒 Check Civil 3D — the routine checks whether the Civil 3D COM interface is available.🧩 Read Point Groups — the program reads existing Civil 3D point groups from the active drawing.🪟 Open Export Dialog — the routine creates and opens a temporary DCL dialog named Export COGO Points.🔍 Filter Groups — the user can filter point group names with wildcard patterns using * and ?.📌 Select Point Groups — the user selects one or more point groups from the multi-select list.✅ Choose Export Fields — the user enables or disables the COGO point properties that should be exported.🟢 Select All Fields — the user can click Select All Fields to enable all export columns.🧹 Select No Fields — the user can click Select No Fields to clear all export columns.📤 Choose Output Mode — the user chooses whether to open Excel automatically or save directly as CSV.📁 Choose Save Folder — when CSV mode is used, the user selects a predefined project folder from the dialog list.📘 Confirm Export — the user clicks OK to collect points from the selected groups and export the selected fields. Functionalities🧩 Civil 3D Point Group Selection — the routine exports points from selected Civil 3D point groups instead of requiring manual point selection in the drawing.🔍 Point Group Filtering — the dialog supports wildcard filtering with * and ? to help find point groups quickly.📌 Multi Group Export — the user can select multiple point groups and export all valid COGO points found in those groups.🔢 Point Number Export — the routine can export the Civil 3D point number using the Number property.📐 Coordinate Export — the routine can export Easting, Northing, and Elevation values.📊 Grid Coordinate Export — the routine can export GridEasting and GridNorthing when available.🌍 Geographic Export — the routine can export Longitude, Latitude, ScaleFactor, and Convergence values when supported by the point object.📝 Description Export — the routine can export RawDescription, FullDescription, and DescriptionFormat.🎨 Style Export — the routine can export point style and point label style information.🏷️ Layer Export — the routine can export the Civil 3D point layer.📐 Scale Export — the routine can export X-Y scale and Z scale information through XYScale and ZScale.🔄 Rotation Export — the routine can export marker rotation and label rotation fields.🧠 Project Version Export — the routine can include a project version field in the export column list.📊 Excel Export — when Open Excel file automatically after export is enabled, the routine creates a new Excel workbook and writes the selected COGO point data into it.📤 CSV Export — when Excel opening is disabled, the routine writes a CSV file directly using AutoLISP file input and output, without creating an Excel COM object.📁 Predefined Save Folders — the dialog includes predefined project folders such as Fal_EP, Beu, Bis, Fal_AU, La, Npl, Tp, Wrs, Ags, Fhs, and Sls.💾 Timestamped CSV Naming — CSV files are saved with names like CogoExport_YYYYMMDD_HHMMSS.csv.✅ Select All Fields — the dialog can turn on all 22 export checkboxes at once.🧹 Select No Fields — the dialog can turn off all 22 export checkboxes at once.🔒 Safe Property Reading — the routine uses vl-catch-all-apply to avoid stopping the export when a point property is unavailable.🪟 Temporary DCL Interface — the DCL dialog is generated dynamically by the LISP code and does not require a permanent external DCL file. Important Helper Logic📁 Folder Path Cleanupcogo:strip-bs removes trailing backslashes from folder paths.📁 Folder Path Buildercogo:add-bs ensures that a folder path ends with a backslash.📁 Predefined Folder Indexcogo:pf-idx-safe validates the selected predefined folder index.📁 OneDrive Root Resolvercogo:onedrive-root builds the base path from USERPROFILE and OneDrive - DB E.C.O. Group.📁 Save Folder Resolvercogo:pf-folder combines the OneDrive root with the selected predefined project folder.🧩 Civil 3D Document Connectioncogo:c3ddoc connects to the active Civil 3D document through AeccXUiLand.AeccApplication.🔒 Safe Property Readercogo:getPropSafe reads point properties safely and falls back from MarkerRotation to Rotation, and from XYScale to Scale when needed.📊 Excel Cell Writercogo:putCellValue writes data safely into Excel cells.🧩 String Split Helpercogo:splitString parses the DCL multi-selection index string.📘 String Join Helpercogo:joinStrings joins selected point group names for command-line messages.✅ Checkbox Toggle Helpercogo:toggleAllCheckboxes turns all 22 field checkboxes on or off.📋 Checkbox Collectorcogo:collectFlags collects all 22 field states before export.🧩 Point Group Readercogo:getPointGroups reads available Civil 3D point group names from the active drawing.📌 Points From Groupscogo:getPointsFromGroups reads point numbers from selected point groups, finds the matching Civil 3D point objects, and returns a point object list for export.🪟 Runtime Dialog Generatorcogo:createRuntimeDCL writes the temporary Export COGO Points DCL interface.📤 CSV Field Formattercogo:val2csv formats values as safe CSV fields, including string quoting and quote escaping.📤 CSV Export Enginecogo:exportToCSV writes the selected point data to a timestamped CSV file without opening Excel.📊 Excel Export Enginecogo:exportToExcel creates a new Excel workbook, writes headers and data rows, auto-fits columns, and displays Excel. Important Code Notes📌 Command Namethe command name is COGOEXPORT.🔴 Platform Requirementthis routine requires Autodesk Civil 3D because it uses Civil 3D point groups and COGO point COM objects.🔴 Excel RequirementExcel export mode requires Microsoft Excel COM support through Excel.Application.🔴 CSV Folder RequirementCSV export mode does not create missing folders. The selected predefined folder must already exist.🔴 OneDrive Path Requirementpredefined CSV folders depend on USERPROFILE and the OneDrive - DB E.C.O. Group folder structure.🔴 Default Output NoteOpen Excel file automatically after export is enabled by default, so the routine opens Excel unless the user disables that option.🔴 No Manual Point Selectionthe routine exports points from selected point groups, not from manually selected points in the drawing.🔴 Field Availability Notesome fields may be blank if the selected Civil 3D point object does not expose the requested property.🔴 Code Review Notethe duplicate point-number cleanup inside cogo:getPointsFromGroups compares a number with the result of last, which returns a list. This should be reviewed and may need car with last to avoid duplicate handling errors.🔴 Civil 3D Object Limitationthe routine does not modify ProfileView, SectionView, Alignment, corridor models, labels, bands, styles, point groups, or drawing geometry. It exports COGO point data only. Final Result The final result is a Civil 3D point group export workflow that sends selected COGO point group data to Excel or CSV. The user can filter point groups, select one or more groups, choose the required point data columns, and export the result with fewer manual steps. This improves productivity, supports faster survey QA, makes Civil 3D point reporting easier, reduces manual Excel setup, and helps project teams manage point data exports in a cleaner and more standardized way.