CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
Over 1.095.000 registered users (EN+CZ). AutoCAD tips, Inventor tips, Revit tips. Try the new precise Engineering calculator. New AutoCAD 2026 commands and variables.

CAD tip CAD tip # 7193:

Question

CAD 
 %  platform  category 
A
Using the free utility CS CsvLayers you can automatically create (import) an arbitrary list of layers to your DWG drawing by reading in a text file with layer definitions.

You can create the layer list in Excel (CSV - comma-delimited values format), or type it in a text editor. The list can contain either the layer names only, or also their properties - color, linetype, lineweight, plot/noplot, visibility... Possible already existing layers will be redefined with the properties read from the CSV file. Optionally, you can also modify the existing layers, not create new ones.

The requested linetypes must be preloaded or they are autoloaded from the default .LIN file. Colors are supported both from the ACI palette (indexed) or as truecolors (specified as a "(R G B)" triplet). The parameters you don't want to set can be omitted.

You can download the application CsvLayers from DL Download. Load it with APPLOAD and type the CSVLAYERS command.

An example of the layer definition file:

  
;CsvLayers sample file
;Expected format:  
;LayerName[,Color#[,LineType[,NoPlot(0/1)[,Off(0/1)[,Freeze(0/1)[,Lweight#[,Description[,Transparency#]]]]]]]
;  
MyHidden,4,Dashed,1,1,1,25,"This will be hidden,OK?",50
YellowLayer,2,GAS  
GreenishLayer,(34 156 27)
Prague  
Ceske Budejovice,,,,,,,My hometown

Created layers

The command LAYERS2CSV can export the CSV layer definition file from your existing drawing. You can then modify the list in Excel and re-import it to your AutoCAD DWG.

You can also use this command pair to copy layer descriptions from one drawing to another one.

Enclose descriptions in double quotes ("") to include commas. You can preset your own delimiter by setting:

(setq _CSVdelimiter ";")

ACADADTACADMCivilMapACLT2025
100% *CAD
29.1.2010    45534×  
Share the tip:
Digg it! Del.icio.us Facebook Twitter Google bookmark Technorati StumbleUpon

See also:
Tip 14414:Link geo-tagged photos from your mobile phone to AutoCAD DWG maps.
Tip 14304:How to generate a report of used blocks including their visibility status in AutoCAD LT?
Tip 14285:How to identify duplicate blocks in AutoCAD DWG drawings? SelDupBlk.
Tip 13938:ModDXF - utility for bulk modification/display of internal DXF properties in DWG entities.
Tip 13878:SelectSimilar - extended selections for AutoCAD, incl. LT and Web versions


Back    All CAD Tips



Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD: 
OS: 
Categ: 
Text:
 FAQ
  



Featuring:
Increase your productivity with our set of BIM add-on functions for Autodesk Revit
CADstudio Revit Tools More info


Please use these tips at your own risk.
ARKANCE is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist