CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
New CADforum look launched.
Over 1.081.000 registered users (EN+CZ). New 1D nesting and 3D nesting tools, updated Color converter. New AutoCAD 2025 commands and variables. Learn about twiGIS.

CAD tip CAD tip # 4416:

Question

CAD 
 %  platform  category 
A
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    15499×  
Prices - CAD eShop:
applies to: AutoCAD 2000 · AutoCAD 2004 · AutoCAD 2006 ·

See also:
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 14230:How to transfer layer properties from another DWG drawing?
Tip 14223:Arithmetic operations for renaming blocks, levels, layouts...
Tip 14190:How to replace non-ASCII characters in AutoCAD layer names?


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:
Extend your AutoCAD LT productivity with our popular add-on
CADstudio LT Extension 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