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