Function Syntax: FeatureLinesStyleExtra Version: 1.0 Date: 15.06.2026 13:17:06 Version: 1.1 Date: 15.06.2026 1:58:22PM N/A Description This project is an Autodesk Civil 3D C# .NET plugin that creates Civil 3D feature lines from selected drawing objects. The project recreates the Civil 3D create-feature-lines-from-objects workflow and adds a custom WPF dialog with wildcard feature line style filtering. The main command is FeatureLinesStyleExtra. The project also includes the command FL_DUMPLOG for printing the active session log to the AutoCAD command line. The plugin is intended for Civil 3D users who need faster feature line creation, easier feature line style searching, command logging, and a more controlled conversion workflow. Project Type โ€ข ๐Ÿงฉ C# .NET Plugin โ€” this is a compiled Civil 3D plugin project that builds a CivilFeatureLines.dll file. โ€ข ๐ŸชŸ WPF User Interface โ€” the project uses CreateFeatureLinesDialog.xaml and CreateFeatureLinesDialog.cs to display a custom settings window. โ€ข ๐Ÿ“˜ Documentation Included โ€” the project includes README.md with build notes, commands, log format, and suggested improvements. โ€ข ๐Ÿ”ด Not A Standalone LISP โ€” this uploaded project is not a single AutoLISP routine and does not include a LISP loader in the visible project files. Main Commands โ€ข ๐Ÿš€ FeatureLinesStyleExtra โ€” opens the feature line creation dialog and converts selected objects into Civil 3D feature lines. โ€ข ๐Ÿ“‹ FL_DUMPLOG โ€” prints all in-memory session log entries to the AutoCAD command line. Loading Method โ€ข ๐Ÿงฐ Build DLL โ€” open CivilFeatureLines.csproj in Visual Studio and build the project as x64. โ€ข ๐Ÿ“ฆ Load Plugin โ€” load the compiled CivilFeatureLines.dll in Civil 3D using NETLOAD. โ€ข ๐Ÿ“Œ Run Command โ€” run FeatureLinesStyleExtra from the Civil 3D command line. โ€ข ๐Ÿ“‹ Review Log โ€” run FL_DUMPLOG to print the current command session log. User Workflow โ€ข ๐Ÿš€ Start Command โ€” the user runs FeatureLinesStyleExtra in Civil 3D. โ€ข ๐Ÿ“Œ Select Objects โ€” the command prompts the user to select objects that should be converted to feature lines. โ€ข ๐Ÿงฉ Collect Sites โ€” the plugin reads available Civil 3D sites from the active drawing. โ€ข ๐ŸŽจ Collect Feature Line Styles โ€” the plugin reads feature line style names from the active Civil 3D document. โ€ข ๐ŸชŸ Open WPF Dialog โ€” the plugin opens the Create Feature Lines dialog. โ€ข ๐ŸŒ Choose Site โ€” the user can select None for siteless feature lines or select an available Civil 3D site. โ€ข ๐Ÿท๏ธ Set Name Template โ€” the user can define the feature line name template used during creation. โ€ข ๐ŸŽจ Assign Style โ€” the user can enable style assignment and select a feature line style from the filtered list. โ€ข ๐Ÿ” Filter Styles โ€” the user can search feature line styles with wildcard patterns such as * and ?. โ€ข ๐Ÿงฑ Choose Layer Mode โ€” the user can choose a custom layer, the current layer, or the selected entity layer option. โ€ข ๐Ÿงน Choose Erase Option โ€” the user can erase original source entities after feature line creation. โ€ข ๐Ÿ“ Assign Elevations โ€” the user can request elevation assignment from a surface. โ€ข ๐Ÿงน Weed Points โ€” the user can request the Civil 3D weed feature lines command after feature lines are created. โ€ข โœ… Confirm โ€” the user clicks OK to create the feature lines. โ€ข ๐Ÿ”ด Cancel โ€” the user clicks Cancel to close the dialog without creating feature lines. Functionalities โ€ข ๐Ÿš€ Feature Line Creation โ€” the plugin converts selected objects into Civil 3D feature lines using FeatureLine.Create. โ€ข ๐ŸŒ Site Selection โ€” the dialog lets the user create siteless feature lines or assign new feature lines to an existing Civil 3D site. โ€ข ๐Ÿ”’ Correct Site Overload Handling โ€” the code uses the two-argument FeatureLine.Create overload when the site is None, avoiding the Civil 3D error caused by passing ObjectId.Null as a site ID. โ€ข ๐ŸŽจ Feature Line Style Assignment โ€” when enabled, the plugin assigns the selected Civil 3D feature line style by setting StyleId on the created feature line. โ€ข ๐Ÿ” Wildcard Style Search โ€” the style list supports * for any characters and ? for a single character. โ€ข ๐Ÿท๏ธ Feature Line Naming โ€” the plugin uses a name template and replaces the next-counter token with a four-digit sequence number. โ€ข ๐Ÿงฑ Custom Layer Creation โ€” when custom layer mode is selected, the plugin checks whether the layer exists and creates it if needed. โ€ข ๐Ÿงฑ Layer Assignment โ€” when a layer name is resolved, the created feature line layer is set through the feature line Layer property. โ€ข ๐Ÿ“ Elevation Assignment โ€” when enabled, the plugin calls AssignElevationsFromSurface using ObjectId.Null to use the first available surface. โ€ข ๐Ÿงน Source Entity Erase โ€” when enabled, the original selected source entity is erased after the feature line is created. โ€ข ๐Ÿงน Weed Points Workflow โ€” when enabled, the plugin queues _AeccWeedFeaturelines after creation and asks the user to select the newly created feature lines when Civil 3D prompts. โ€ข ๐Ÿ”’ Document Locking โ€” the command uses DocumentLock before Civil 3D database writes to reduce write failures. โ€ข ๐Ÿงฉ Transaction Handling โ€” feature line creation, style assignment, layer assignment, elevation assignment, and source erasing are wrapped inside an AutoCAD transaction. โ€ข ๐Ÿ“‹ Command Logging โ€” the plugin logs command progress, warnings, failures, selected options, and conversion results. โ€ข ๐Ÿ’พ Daily Log Files โ€” logs are saved under %APPDATA%\CivilFeatureLines\Logs with daily file names. โ€ข ๐Ÿ“˜ Version Banner โ€” when the DLL loads, the plugin prints a version banner using the assembly version and DLL creation timestamp. โ€ข ๐ŸชŸ Help Button โ€” the WPF dialog includes a Help button explaining wildcard style filter examples. Important Helper Logic โ€ข ๐Ÿš€ Plugin Entry Point โ€” App.Initialize starts file logging, prints the version banner, and reports available commands when the DLL is loaded. โ€ข ๐Ÿ“‹ Logger Singleton โ€” CommandLogger.Instance provides shared command-line and file logging for the whole plugin. โ€ข ๐Ÿ’พ File Logging โ€” EnableFileLogging creates the log folder and writes daily log files named like FeatureLines_yyyy-MM-dd.log. โ€ข ๐Ÿ“‹ Session Log Dump โ€” DumpSessionLog prints the in-memory session log to the AutoCAD command line. โ€ข ๐Ÿ“˜ Version Builder โ€” BuildVersionString reads the executing assembly version and DLL last-write time to build the load banner. โ€ข ๐Ÿงฉ Site Collector โ€” GetSiteNames reads Civil 3D site names from CivilDocument.GetSiteIds. โ€ข ๐ŸŽจ Style Collector โ€” GetFeatureLineStyleNames reads available styles from cdb.Styles.FeatureLineStyles. โ€ข ๐ŸŒ Site Resolver โ€” ResolveSiteId finds the selected Civil 3D site object ID by name. โ€ข ๐ŸŽจ Style Resolver โ€” ResolveFeatureLineStyleId finds the selected feature line style object ID by name. โ€ข ๐Ÿงฑ Layer Resolver โ€” ResolveTargetLayer decides whether the command should use custom, current, or selected-entity layer behavior. โ€ข ๐Ÿงฑ Layer Creator โ€” EnsureLayerExists creates the custom target layer when it does not exist. โ€ข ๐Ÿ” Wildcard Converter โ€” WildcardToRegex converts wildcard style filters into anchored regular expressions. โ€ข ๐Ÿ” Filter Logic โ€” ApplyFilter updates the visible feature line style list based on the wildcard filter text. โ€ข โœ… Dialog Result Builder โ€” BtnOK_Click validates style selection and builds the CreateFeatureLinesOptions result object. Important Code Notes โ€ข ๐Ÿ“Œ Command Name โ€” the main command name is FeatureLinesStyleExtra. โ€ข ๐Ÿ”ด Platform Requirement โ€” this project requires Autodesk Civil 3D because it uses Civil 3D APIs such as FeatureLine, Site, CivilDocument, and FeatureLineStyle. โ€ข ๐Ÿ”ด Build Requirement โ€” the project targets .NET Framework 4.8, uses WPF, targets x64, and requires AutoCAD and Civil 3D managed references. โ€ข ๐Ÿ”ด Props File Requirement โ€” the project imports a machine-specific ObjectARX and Civil 3D reference props file from a OneDrive path. If that file is missing, the project may not build until the import path is corrected. โ€ข ๐Ÿ”ด Output Path Note โ€” the project redirects bin and obj output to LocalAppData to avoid OneDrive sync locks and long path problems. โ€ข ๐Ÿ”ด Assign Name Limitation โ€” the dialog includes an AssignName option, but the visible command code always builds the feature line name from the template and does not branch on AssignName. โ€ข ๐Ÿ”ด Selected Entity Layer Limitation โ€” the dialog includes a Use selected entity layer option, but the visible layer resolver returns null for that mode and does not explicitly set each new feature line to the source entity layer. โ€ข ๐Ÿ”ด Elevation Surface Limitation โ€” AssignElevationsFromSurface is called with ObjectId.Null, meaning the code relies on Civil 3D behavior for the first available surface and does not provide a surface picker. โ€ข ๐Ÿ”ด Weed Points Limitation โ€” the managed API does not weed points directly here. The plugin queues the native _AeccWeedFeaturelines command and the user must follow the Civil 3D prompt. โ€ข ๐Ÿ”ด Undo Limitation โ€” the README notes undo grouping as a suggested improvement, so the visible code does not implement a named one-step undo group for the whole batch. โ€ข ๐Ÿ”ด No AutoLISP Loader Note โ€” the visible zip contents do not include an AutoLISP loader file. The plugin is loaded with NETLOAD after building the DLL. Final Result The final result is a Civil 3D feature line creation workflow with a custom searchable WPF dialog. The user selects source objects, chooses a site, optional style, layer behavior, erase option, elevation assignment, and weed-point option, then creates Civil 3D feature lines with detailed command logging. This improves productivity, speeds up style selection, reduces repetitive Civil 3D dialog work, helps with QA tracking through logs, and gives Civil 3D users a more controlled workflow for creating feature lines from objects.