Function Syntax: AddToPG https://justopie.github.io/blog/2016/01/how-to-add-a-point-to-a-point-group-with-autolisp-wrap-up/ Description This AutoLISP routine is an interactive Civil 3D point group manager for adding, moving, and renaming Civil 3D COGO point groups. The program requires the user to select existing Civil 3D COGO points from the drawing and then choose a target point group from a dialog. The main command is AddToPG. The tool works by editing Civil 3D point group query settings, especially the IncludeNumbers property of the point group QueryBuilder. Main CommandAddToPG starts the Civil 3D point group manager dialog. Loading Method • Load the file AddPoint2Group.LSP in Civil 3D using APPLOAD. • Run AddToPG from the Civil 3D command line. User Workflow • The user runs AddToPG. • The program opens a temporary DCL dialog named Point Group Manager. • The dialog displays the existing Civil 3D point groups, excluding _All Points. • The user clicks Select Points < to temporarily hide the dialog and select Civil 3D COGO points on screen. • The program filters the selection to AECC_COGO_POINT objects only. • The selected point numbers are displayed in the Selected Points field as a comma-separated list. • The user chooses an action type: Add, Move, or Rename. • For Add or Move, the user selects an existing point group or types a new point group name. • For Rename, the user selects an existing point group and enters the new group name. • The user clicks Apply to perform the action and keep the dialog open. • The user clicks OK to perform the action and close the dialog. • The user clicks Cancel to close the dialog without continuing. Functionalities📌 Civil 3D Point Selection — the routine uses ssget with the filter AECC_COGO_POINT, so it only accepts Civil 3D COGO point objects.📋 Point Number Extraction — the program reads the Number property from each selected COGO point.🧩 Existing Point Group Browser — the dialog lists available Civil 3D point groups so the user can choose the target group visually.➕ Add Points to Group — the routine adds selected point numbers to the selected or newly created point group.🔄 Move Points Between Groups — the routine removes the selected point numbers from other point groups and then adds them to the target point group.🏷️ Rename Point Group — the routine can rename a selected Civil 3D point group using vla-put-name.🆕 Create Target Group When Needed — if the user enters a new point group name, the routine can create the group using vla-add.🔒 Duplicate Membership Check — before appending a point number, the routine checks whether the point is already contained in the target point group.📝 IncludeNumbers Editing — the routine updates the Civil 3D point group QueryBuilder.IncludeNumbers string.🧹 Remove Point Numbers from Other Groups — during Move mode, the routine removes selected point numbers from other point groups that explicitly list them in IncludeNumbers.🪟 Temporary DCL Dialog — the dialog is generated dynamically by the LISP code, so a separate permanent DCL file is not required.✅ Apply Without Closing — the Apply button runs the selected operation and keeps the dialog open for additional edits. Important Helper LogicOP:c3ddoc connects to the active Civil 3D document through AeccXUiLand.AeccApplication.CollectionNames->list extracts point group names from the Civil 3D point group collection.UpdateList fills the dialog list box with point group names.AddPointGroup creates a point group or retrieves it if it already exists.GetPointGroup retrieves an existing Civil 3D point group by name.ContainsPoint checks whether a point number is already part of a point group.GetQueryBuilder returns the Civil 3D point group query builder object.AddPointToGroup appends the point number to IncludeNumbers when the point is not already included.SelectPoints->List lets the user select Civil 3D points and returns their point numbers.StringSplit splits comma-separated point number strings.RemoveNumbersFromString removes selected point numbers from an existing IncludeNumbers list.createDialog writes the temporary DCL interface used by the command. Important Code NotesThis routine requires Autodesk Civil 3D because it uses Civil 3D COM objects and COGO point group APIs.The tool does not create new COGO points. It manages existing Civil 3D COGO points and their point group membership.Move mode removes point numbers only from point groups where those points are explicitly listed in QueryBuilder.IncludeNumbers.Move mode may not remove points from groups that include points through other query rules such as raw description, elevation, name, style, or other point group filters.The _All Points group is intentionally excluded from the editable point group list.The file header mentions a 2026 version history date, which appears to be a future or custom revision date and should be checked if version tracking matters.The helper function CollectionProperty->list is defined but does not appear to be used by the main workflow. Final Result The final result is a faster Civil 3D point group management workflow. Users can select COGO points directly from the drawing, add them to a point group, move them between explicitly numbered point groups, create a new target group, rename an existing group, and repeat operations using the Apply button. This improves productivity, reduces manual point group editing, supports cleaner Civil 3D drawing organization, and makes survey point management faster and more controlled.