Function Syntax: LI_FOLDERS / LayerImport Version: 1.1 Date: 20.06.2026 6:38:54PM https://lee-mac.com/layerextract.html Description 🧩 LayerImport is an AutoCAD and Civil 3D AutoLISP layer standards importer for restoring layer properties from CSV or XML files through a production-friendly DCL interface. 📥 It is designed for CAD template recovery, layer-state transfer, project standardization, and Civil 3D drawing cleanup where layer properties must be copied accurately between drawings. Function Syntax 🚀 Main command: LayerImport 🧰 Utility command: LI_FOLDERS 📌 Load the LSP file with APPLOAD or from your AutoCAD startup suite, then run the command from the command line. SEO Optimized Overview 🧩 This AutoCAD layer import tool reads external CSV or XML layer tables and applies the selected layer properties to the active DWG. 📥 The workflow supports full layer-state restoration including On/Off, Frozen, Frozen in Viewport, Locked, Plot, Colour, Linetype, Lineweight, Plot Style, and Description. 🎛️ The DCL dialog gives the user field-by-field control, so a drawing can import only colour, only linetype, only viewport freeze settings, or any selected property combination. 🔎 A wildcard layer filter using * and ? plus comma-separated OR matching helps isolate project layers before applying changes. 🧠 The tool includes undo-state snapshots so the user can apply changes, review the result, and restore the previous layer state when needed. 🗂️ Predefined folder management and DWG-name matching help automate common Civil 3D project folders and repeatable layer standards workflows. Primary Workflow 1️⃣ Run LayerImport in the AutoCAD command line. 2️⃣ Browse to a CSV or XML layer file or select a predefined project folder. 3️⃣ Choose which properties to import: colour, linetype, lineweight, on/off, plot, frozen, viewport freeze, locked, plot style, or description. 4️⃣ Filter layers with * and ? patterns, then select specific rows or import all. 5️⃣ Click Apply to update the drawing, then use Undo if the imported state must be rolled back. Core Functionalities ✅ Import AutoCAD layer properties from CSV or XML. ✅ Create missing layers automatically when enabled. ✅ Update existing layers only when the update option is enabled. ✅ Choose exactly which layer fields are imported using property toggles. ✅ Filter import rows using * and ? wildcard patterns. ✅ Use multi-select layer lists, Select All, Select None, paging, and horizontal-scroll support for long layer names. ✅ Apply changes without closing the dialog, then use Undo to restore the previous layer state. ✅ Copy the visible layer list or debug report to the clipboard. ✅ Store settings in a support-folder configuration file and remember dialog position. ✅ Use predefined OneDrive/project folders and auto-select a folder based on the active drawing name. Important Commands and Helper Functions 🧩 LI:MakeDCL dynamically writes the embedded DCL dialog to a unique temporary file for the main import interface. 🧩 LI:ParseCSV reads CSV header and data rows, trims values, and prepares layer rows for import. 🧩 LI:ParseXML reads Layer blocks from an XML layer export format and converts them into import rows. 🧩 LI:FilterRows filters loaded layer rows by wildcard patterns using * and ? matching. 🧩 LI:SaveLayerStates and LI:RestoreLayerStates provide one-step undo for imported layer changes. 🧩 LI:ApplyRow applies selected properties to each AutoCAD layer through VLA and DXF edits. 🧩 LI:SetFrozenInVP updates the viewport-freeze bit using DXF group 70 logic. 🧩 LI:SetPlot updates the layer plot flag using DXF group 290. 🧩 LI:DoImport runs the full create/update workflow and returns the created, updated, and skipped summary. 🧩 LI:CopyToClip and LI:DebugReport copy layer names and import diagnostics to the clipboard. 🧩 LI_FOLDERS opens the predefined folder manager for adding, deleting, reordering, and saving project folder presets. Result ✅ Selected layer properties are applied to the current AutoCAD drawing. ✅ Missing layers can be created with imported properties. ✅ Existing layer states can be updated selectively and reversed with the built-in undo snapshot. ✅ A final summary reports created, updated, and skipped layers. Operational Notes ⚠️ LayerImport changes drawing layer definitions and should be tested on a copy or used with Undo available. ⚠️ Viewport-freeze and plot flags are applied through DXF data, so results depend on valid input values. 📌 The input CSV or XML must contain compatible layer property columns. Best Use Cases 🏗️ Civil 3D project layer standardization. 📥 Restoring layer properties from exported layer tables. 📊 Template maintenance, QA checks, and layer-state migration between drawings. Tags 🏷️ AutoCAD, 🏷️ AutoLISP, 🏷️ Civil 3D, 🏷️ Layer Import, 🏷️ Layer Standards, 🏷️ CSV Import, 🏷️ XML Import, 🏷️ Layer Properties, 🏷️ DCL Dialog, 🏷️ CAD Automation