Short description
Sort / Purpose:
Create a Civil 3D Structure (AeccDbStructure) at every selected
COGO point, by copying a user-chosen template structure and
placing the copies at each point’s location with rim set to point elevation.
• Scope: Batch “stamp” manholes/inlets/etc. on COGO points.
• Dependency: Uses only AeccDb COM objects
(no AeccXUiPipe / AeccPipeApplication), so it avoids Civil 3D COM version issues.

Command:
Main Command:
• CogoPoints2Structures
→ Prompts for a template structure and a set of COGO points, then creates one new structure per COGO point.
Description:
What the routine does:
1. Asks the user to pick a template structure (
Basic flow & safety: • If the picked entity is not an
AeccDbStructure) in the drawing.
2. Lets the user select a set of COGO points (AECC_COGO_POINT).
3. For each selected COGO point it:
• Copies the template structure (vla-Copy).
• Moves the copy to the point’s Location via SetLocation (3D point).
• Sets RimElevation equal to the COGO point’s Elevation.
4. Prints how many structures were created.Basic flow & safety: • If the picked entity is not an
AeccDbStructure, it warns and lets you try again.
• If no valid template is selected → exits with a message.
• If no COGO points are selected → exits with “No COGO points selected.”
• CMDECHO is turned off during processing and restored at the end (even on error).
Helper function: (if any)
Helper / internal logic:
Error handling
• Local
*error* definition inside the command:
– Restores CMDECHO back to its original value.
– Suppresses standard “Function cancelled” style messages.
– Prints a generic "Error: <msg>" if the error is not user cancel/break/quit.
Key COM calls
• Template structure pick:
– (entsel) → vlax-ename->vla-object → checks ObjectName = "AeccDbStructure".
• COGO point data:
– Location property → 3D point where the structure will be placed.
– Elevation property → rim Z for the new structure.
• Structure copy & placement:
– (vla-Copy tmplStruct) → new structure object.
– (vlax-invoke newStruct 'SetLocation loc) → move to point.
– (vlax-put newStruct 'RimElevation ptElev) → set rim elevation.
Functionalities:
Main functionalities:
1. Turn COGO points into fully-fledged structures
• Quickly convert survey / design COGO points into structures (manholes, inlets, etc.) that share all properties of a chosen template.
• Geometry and style come from the template; position and elevation come from each COGO point.
2. Template-driven consistency
• You control layer, style, parts list, and other structure properties via the template structure you select at the beginning.
• All created structures are identical clones of that template, only moved and updated for rim elevation.
3. Simple selection model
• Template: one picked object, must be
AeccDbStructure.
• COGO points: ssget with filter ((0 . "AECC_COGO_POINT")) – window, crossing, filter, etc., all allowed.
4. Safe and version-agnostic
• No use of AeccXUiPipe or AeccPipeApplication means fewer issues across different Civil 3D versions.
• Clean local error handler makes it safe to cancel midway without leaving CMDECHO changed.
Result:
Result / Usage (02):
1. Type CogoPoints2Structures in the command line.
2. When prompted, click on an existing template manhole/structure (must be
Final outcome: you instantly populate your Civil 3D model with correctly positioned and elevated structures, one per COGO point, all styled and configured identically to the chosen template.
AeccDbStructure).
3. Then select one or more COGO points (e.g. by window, filter, or manual picks).
4. The routine will:
– Create a copy of the template for each selected COGO point.
– Move each copy to the COGO point’s Location.
– Set each structure’s RimElevation to the point’s Elevation.
5. At the end it reports how many structures were created from the template.Final outcome: you instantly populate your Civil 3D model with correctly positioned and elevated structures, one per COGO point, all styled and configured identically to the chosen template.
Images, animations etc.

Additional info:
Based on / Source code:
Open Website
Share this page:
Subscribe
Login
0 Comments
Oldest
