CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 6242
Plex.Earth connects AutoCAD and Google Earth

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
ACAD2000ACAD2004ACAD2006
100% *  CAD 
13.5.2005    15311×  
Prices - CAD eShop:
applies to: AutoCAD 2000 · AutoCAD 2004 · AutoCAD 2006 ·

See also:
Tip 14045:In my AutoCAD script file (.SCR) I cannot enter a name containing a space.
Tip 13878:SelectSimilar - extended selections for AutoCAD, incl. LT and Web versions
Tip 13855:DBXscanLayers and DBXscanBlocks - bulk report content of DWG files in a folder.
Tip 13822:Fast layer visibility toggle ON/OFF.
Tip 13435:Bulk setting of layer properties according to the object in that layer.


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   



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 Systems is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist