LayerImport

Short 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.

Command:

🚀 Main command: LayerImport
🧰 Utility command: LI_FOLDERS
🧩 Load the LSP in AutoCAD or Civil 3D, then type the command at the command line.

Description:

🧩 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.

Helper function: (if any)​

🧩 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.

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.

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.

Images, animations etc.

Pixel

XAML code:

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

</TextBlock>
            
<Grid>
<Image Source=".png" Stretch="Uniform"/>
</Grid>

<Grid>
<Image Source=".png" Stretch="Uniform"/>
</Grid>

<Grid>
<MediaElement
 Source="GIF"
 Stretch="Uniform"
 Visibility="Visible"/>
 </Grid>

</StackPanel>
</src:RibbonToolTip.ExpandedContent>
</src:RibbonToolTip>
</ResourceDictionary>

Additional info:

Share this page: