Function Syntax: DANALIGN / DANLOG / DANHELP Version: 1.1 Date: 23.06.2026 7:27:41AM https://forums.autodesk.com/t5/civil-3d-forum/how-to-generate-multiple-alignments-from-multiple-polylines/td-p/9137424 AutoCAD Civil 3D Alignment Creator Loader and Plugin Description Important: The AutoLISP file does not create alignments by itself. It loads the compiled AutoCAD .NET plugin named @Dan_Templeate.dll into AutoCAD Civil 3D. General action of the program This program allows the user to load a Civil 3D alignment creation tool, select drawing entities, review them in a grid, apply styles and label sets, then batch-convert those entities into Civil 3D alignments. Main AutoLISP command: ReloadPlugin The command copies the plugin DLL from the deploy folder into a temporary shadow folder, gives the copied DLL a timestamped name, then loads that copy with the AutoCAD NETLOAD command. This prevents AutoCAD from locking the original DLL in the deploy folder, so the developer can rebuild the plugin from Visual Studio without closing AutoCAD. DLL loading workflow • The LISP sets the source path for @Dan_Templeate.dll. • The LISP creates a temporary shadow-copy folder inside the Windows TEMP directory. • The LISP deletes old shadow DLL copies before loading the new one. • The LISP generates a timestamp using the AutoCAD drawing date variable. • The LISP copies the DLL to the shadow folder using the timestamped filename. • The LISP runs NETLOAD on the copied DLL. • The LISP prints a loader message in the AutoCAD command line after the plugin is loaded. Configuration aspect: The DLL source path is hard-coded and must be changed if the deploy folder is moved to another computer or another project location. Code note: The comment says that the loader keeps the last 3 shadow copies, but the current implementation uses cddr, so it actually skips the two newest files and deletes the rest. Main plugin commands registered after loadingDANALIGN opens the Alignment Creator form.DANLOG opens the floating development log window.DANHELP prints the command reference and shortcut information in AutoCAD. DANALIGN functionality • Allows the user to select Line, Arc, Spline, Polyline, and Civil 3D-compatible polyline geometry from the drawing. • Loads the selected entities into a grid where each row can be checked or unchecked before processing. • Generates alignment names using a prefix, suffix pattern, and optional tokens such as {DWG}, {DATE}, {LAYER}, and {TYPE}. • Lets the user choose alignment style and label set for each row. • Includes filters for names, statuses, styles, and label sets. • Supports wildcard filtering with *, ?, and semicolon-based OR patterns. • Converts Lines, Arcs, and Splines into lightweight polylines before creating Civil 3D alignments. • Uses a spline chord setting to control how finely splines are approximated during conversion. • Creates Civil 3D alignments with selected site, layer, style, and label set settings. • Auto-renames duplicate alignment names by adding version suffixes such as _v2, _v3, and higher values. • Shows created, failed, duplicate, and pending status information using different row colors. • Displays starting station, ending station, and alignment length after creation. • Provides a 2D preview panel showing the selected geometry and current direction. • Highlights the source entity in the AutoCAD viewport when a row is selected. Right-click grid options • Copy selected rows to the clipboard. • Check or uncheck all visible rows. • Check or uncheck selected rows. • Apply bulk style and label set to selected rows. • Rename an already-created alignment in the drawing. • Update style and label set on an already-created alignment. • Reverse alignment direction before creation. • Open entity information for the selected row. • Remove selected rows from the processing list. Post-processing functionalityGround Profile: Creates a surface profile named AlignmentName_GP from the selected Civil 3D surface.Offset Alignments: Creates left and right offset alignments named AlignmentName_L and AlignmentName_R.Sample Lines: Creates a sample line group named AlignmentName_SLG and places sample lines at regular station intervals. Safety and usability features • Uses a document lock and transaction workflow when modifying the AutoCAD database. • Checks whether source entities are erased or invalid before trying to create alignments. • Retries certain transient database errors up to three times. • Stores created alignments in an undo stack with up to 10 undo levels. • Allows the last created batch of alignments to be erased with the Undo button or Ctrl+Z. • Saves user settings in the Windows registry, including prefix, suffix, layer, style, label set, filters, and post-processing values. • Provides live log messages for info, warning, error, and version events. • Allows copying the grid table, exporting it to CSV, and saving the log to a text file. Final result The user can quickly transform multiple AutoCAD drawing entities into Civil 3D alignments, assign consistent styles and labels, generate related profiles, offsets, and sample lines, then review the results directly inside AutoCAD Civil 3D.