CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products []
CZ | EN | DE
Login or
  Visitors: 4028

CAD tip CAD tip # 4416:

Question CAD 
 %  platform  category 
Q - question

How to get rid of spaces in AutoCAD layer names?

A - answer Although space characters are perfectly legal in AutoCAD layer names (as long as EXTNAMES is on), there may be older add-on utilities which do not properly handle layers with spaces.

To quickly replace spaces in layer names use the following VBA macro (use e.g. the _VBASTMT command to run it):

For Each objLayer In ThisDrawing.Layers : objLayer.Name=Replace(objLayer.Name, " ", "_") : Next
100% *  CAD 
13.5.2005    14394×  
Prices - CAD eShop:
applies to: AutoCAD 2000 · AutoCAD 2004 · AutoCAD 2006 ·

See also:
Tip 13014:StickLay - unchangable, fixed layers for selected DWG objects.
Tip 12837:RenameCSV - rename layers, blocks, layouts, views, linetypes using Excel tables
Tip 12760:Replace texts with blocks of the same name - Txt2Ref.
Tip 12392:Export unfolds of sheetmetal parts to DXF - parameters for iLogic and VBA
Tip 12237:UnfoldRS - unfold 3D surfaces to 2D in AutoCAD.

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 glossary   

Track your time spent working on AutoCAD or Revit jobs - automatically with
CADstudio JobTime More info

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