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:

Page Tag: 🏷️ XML Import

  • LayerImport

    β€”

    by

    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…