C3DExploder

Short description

๐Ÿš€ C3DExploder is an AutoCAD Civil 3D C# .NET plugin project with an AutoLISP loader that converts selected Civil 3D objects into native AutoCAD geometry. The tool helps Civil 3D users create AutoCAD polylines, 3D polylines, lines, rectangles, and MText labels from supported Civil 3D entities, while logging the conversion process for QA review, drafting cleanup, and AutoCAD deliverable preparation.
image 000
image 001

Command:

๐Ÿ“Œ Main command: C3DEXPLODE.
๐Ÿ“‹ Log command: C3DEXPLODELOG opens the current daily log file in Notepad.
๐Ÿงน Clear command: C3DEXPLODECLEAR clears the in-memory session log.
๐Ÿ“˜ Version command: C3DEXPLODEVERSION prints the plugin version banner.
๐ŸŽฏ Single-object helper: C3DX1 is an AutoLISP wrapper that lets the user pick one object and call C3DEXPLODE.
๐Ÿงฐ Loading method: load C3DExploder.dll with NETLOAD, or load C3DExploder_Loader.lsp with APPLOAD so the LSP can resolve and load the DLL automatically.
๐Ÿ“ฆ Required output file: C3DExploder.dll should be placed beside C3DExploder_Loader.lsp for the recommended loader workflow.
๐ŸŽฏ Target platform: Autodesk Civil 3D and AutoCAD with .NET Framework 4.8, x64, AutoCAD managed APIs, Civil 3D managed APIs, and Visual LISP support for the loader.

Description:

๐Ÿง  C3DExploder is a Civil 3D to AutoCAD entity converter designed for users who need to simplify Civil 3D custom objects into native AutoCAD geometry. The project includes C3DExploder.cs, EntityExtensions.cs, C3DExploder.csproj, C3DExploder_Loader.lsp, and README.md.

The main workflow starts when the user loads C3DExploder.dll directly with NETLOAD or indirectly through C3DExploder_Loader.lsp. After the plugin loads, it prints a version banner for C3DExploder v4.0.001. The user then runs C3DEXPLODE and selects Civil 3D objects to convert.

For each selected object, the command creates or reuses a target output layer based on the source layer name. Normally this layer is named with the suffix _ACAD. If the source layer name is too long, the suffix is shortened to _AX. The plugin then chooses a specialized conversion strategy when available, or falls back to a generic AutoCAD EXPLODE command route for unsupported object types.

The specialized conversion logic currently supports AeccDbFeatureLine, AeccDbSection, AeccDbSectionCorridor, and AeccDbGraphCrossSection. Feature lines are converted into Polyline3d geometry, sections are converted into Line entities when section links are available, and section views are represented as a rectangular Polyline plus an MText label. Unsupported Civil 3D objects use the generic fallback route.

This project is useful for Civil 3D design review, AutoCAD deliverable preparation, simplified CAD sharing, QA checking, drafting cleanup, and workflows where Civil 3D objects need to be represented as editable AutoCAD geometry. It does not directly modify ProfileView styles, SectionView styles, Alignment geometry, corridors, labels, bands, point groups, pipe networks, or export tables. Its main purpose is Civil 3D object conversion into AutoCAD entities.

Helper function: (if any)โ€‹

  • ๐Ÿ“‹ Logging subsystem โ€” Log.Info, Log.Warn, and Log.Error write timestamped messages to the AutoCAD command line and to persistent daily files in %APPDATA%\C3DExploder.
  • ๐Ÿ“˜ Version banner โ€” VersionInfo.Version stores 4.0.001, and VersionInfo.Banner creates a visible load message with a timestamp.
  • ๐Ÿง  Exploder interface โ€” IEntityExploder defines the shared conversion contract used by each object-specific exploder strategy.
  • ๐Ÿ“Œ Feature line exploder โ€” FeatureLineExploder reads FeatureLine.GetPoints with FeatureLinePointType.AllPoints and creates a native AutoCAD Polyline3d.
  • ๐Ÿ“ Section exploder โ€” SectionExploder attempts to access the Civil 3D section Links collection through reflection and creates AutoCAD Line entities.
  • ๐Ÿงฉ Section fallback โ€” SectionExploder.FallbackBBox creates a closed bounding-box Polyline when section link extraction is not available.
  • ๐Ÿ“Š Section view exploder โ€” SectionViewExploder converts AeccDbGraphCrossSection into a rectangle and an MText label using the object extents.
  • ๐Ÿ”„ Generic AEC fallback โ€” GenericAecExploder commits the active transaction and calls the AutoCAD EXPLODE command for unsupported object types.
  • ๐Ÿงฉ Strategy registry โ€” ExploderRegistry maps Civil 3D object type names to specialized exploders and returns the generic fallback when no match exists.
  • ๐ŸŽจ Layer helper โ€” LayerHelper.EnsureLayer creates target output layers and copies source layer color when possible.
  • ๐Ÿ“ Bounding-box extension โ€” GetBoundingBoxExtents safely reads GeometricExtents and falls back to a small origin-based box if extents cannot be read.
  • ๐Ÿท๏ธ Safe name extension โ€” SafeName tries to read a Civil 3D object Name property and falls back to the object handle.
  • ๐Ÿ” Civil type extension โ€” CivilTypeName attempts to read ObjectName and falls back to the managed class name for type identification.
  • ๐Ÿ“œ LSP DLL resolver โ€” C3DExploder:DllPath finds C3DExploder.dll relative to C3DExploder_Loader.lsp or the current drawing folder.
  • ๐Ÿ“ฆ LSP NETLOAD wrapper โ€” C3DExploder:Load uses netload to load the managed DLL and reports success or failure to the command line.

Functionalities:

  • ๐Ÿš€ Convert Civil 3D objects to AutoCAD geometry โ€” selected Civil 3D entities can be represented as native AutoCAD objects for easier editing, delivery, review, and compatibility.
  • ๐Ÿ“Œ Convert feature lines โ€” supported Civil 3D feature lines are converted into Polyline3d objects using all available feature line vertices.
  • ๐Ÿ“ Convert Civil 3D sections โ€” supported sections are converted into AutoCAD Line entities when section link data is accessible.
  • ๐Ÿงฉ Use bounding-box fallback โ€” when section link data is unavailable, the routine creates a rectangular Polyline from the object extents.
  • ๐Ÿ“Š Convert section views โ€” supported section views are represented by a rectangle and an MText label.
  • ๐Ÿ”„ Fallback to AutoCAD EXPLODE โ€” unsupported object types are sent through the standard AutoCAD EXPLODE command route.
  • ๐ŸŽจ Create sibling output layers โ€” converted geometry is intended to be placed on a layer derived from the source layer with the suffix _ACAD.
  • ๐Ÿ”’ Copy source layer color โ€” newly created output layers inherit the source layer color when the source layer is available.
  • ๐Ÿ“‹ Write persistent logs โ€” conversion activity is written to daily log files under %APPDATA%\C3DExploder.
  • ๐Ÿ“‚ Open the current log file โ€” C3DEXPLODELOG opens the active daily log file in Notepad for troubleshooting and QA review.
  • ๐Ÿงน Clear session log memory โ€” C3DEXPLODECLEAR clears the active in-memory log list during the current AutoCAD session.
  • ๐Ÿ“˜ Print version information โ€” C3DEXPLODEVERSION displays the plugin version and timestamped banner.
  • ๐Ÿงฐ Load from AutoLISP โ€” C3DExploder_Loader.lsp supports easier startup loading and exposes wrapper commands for the managed .NET commands.
  • ๐Ÿงฉ Extend with new converters โ€” developers can add support for additional Civil 3D objects by implementing IEntityExploder and registering the new strategy in ExploderRegistry.
  • ๐Ÿ” Important limitation โ€” specialized conversion is currently implemented only for feature lines, sections, section corridor objects, and graph cross sections.
  • ๐Ÿ”ด Generic fallback caution โ€” the generic fallback calls EXPLODE directly on the selected original object, so it may not preserve the Civil 3D original and may not force the output onto the intended _ACAD layer.
  • ๐Ÿ”ด Batch processing caution โ€” when the generic fallback route is used, the command breaks out of the object loop, so remaining selected objects may not be processed during that run.
  • ๐Ÿ”ด Type routing review โ€” the command routes by ent.GetType().Name, while the project also defines CivilTypeName but does not use it in the main loop. This should be reviewed for Civil 3D object name compatibility.
  • ๐Ÿ”ด Build configuration requirement โ€” the project depends on AutoCAD and Civil 3D managed references, a machine-specific props file, or the fallback AutoCAD 2024 reference paths.
  • ๐Ÿ” Platform limitation โ€” this plugin targets Autodesk Civil 3D and AutoCAD .NET Framework workflows, not plain AutoLISP-only environments.

Result:

๐Ÿ“˜ The final result is a Civil 3D to AutoCAD conversion workflow for simplifying selected Civil 3D entities into native AutoCAD geometry. Users can select supported Civil 3D objects, generate editable AutoCAD output, create organized sibling layers, and review conversion logs. This improves productivity, reduces manual tracing, supports faster QA checks, helps prepare AutoCAD deliverables, and gives CAD teams a repeatable framework for extending Civil 3D object conversion with additional C# exploder strategies.

Images, animations etc.

image 000
image 001
Pixel

Additional info:

Share this page:

Leave a Reply

Page Tag: ๐Ÿท๏ธ C3D_extra_menu

  • C3DExploder

    โ€”

    by

    Short description ๐Ÿš€ C3DExploder is an AutoCAD Civil 3D C# .NET plugin project with an AutoLISP loader that converts selected Civil 3D objects into native AutoCAD geometry. The tool helps Civil 3D users create AutoCAD polylines, 3D polylines, lines, rectangles, and MText labels from supported Civil 3D entities, while logging the conversion process for QA…

  • BookmarksC3DEntities

    โ€”

    by

    Short description ๐Ÿ”– BookmarksC3DEntities.lsp is an AutoCAD Civil 3D AutoLISP bookmark manager that lets users save selected Civil 3D entities into a searchable navigation list. The tool stores object type, object name, color, bounding-box location, handle, and user remarks so designers can quickly zoom back to important alignments, profiles, profile views, corridors, pipes, structures, COGO…

  • GetLabelText_vs.01

    โ€”

    by

    Short description The GetLabelText project is an AutoCAD Civil 3D .NET plugin designed to extract, review, filter, export, and reuse label text from Civil 3D profile views, section views, bands, labels, and annotation objects. The plugin adds the GETLABELTEXT command, which opens a modeless Civil 3D Label Extractor window with tools for label extraction, band…

  • GetLabelText

    โ€”

    by

    Short description Civil 3D Label Extractor โ€” audit, filter, and export all band label text from Profile Views and Section Views in a single modeless panel, without blocking AutoCAD workflows. Command: GetLabelText Description: The Civil 3D Label Extractor (command: GetLabelText) scans every ProfileView and SectionView in the active drawing and collects the complete text of…

  • CopyC3DEntitiesToClipboard

    โ€”

    by

    Short description ๐Ÿ“‹ CopyC3DEntitiesToClipboard.lsp is an AutoCAD Civil 3D AutoLISP clipboard utility that duplicates selected entities, explodes the temporary copies, extracts generated TEXT and MTEXT values, copies the cleaned text to the Windows clipboard, and erases the temporary exploded geometry. It helps Civil 3D users copy visible label information quickly without intentionally exploding the original…