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.090.000 registered users (EN+CZ). AutoCAD tips, Inventor tips, Revit tips. Try the new Engineering calculator. New AutoCAD 2026 commands and variables.
Plex.Earth connects AutoCAD and Google Earth

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    15577×  
applies to: AutoCAD 2000 · AutoCAD 2004 · AutoCAD 2006 ·

See also:
Tip 14446:Undocumented options in AutoCAD FIELDs - hyperlinks, hexadecimal or binary format
Tip 14414:Link geo-tagged photos from your mobile phone to AutoCAD DWG maps.
Tip 14402:What is the difference between the BLOCKREPLACE, BREPLACE, REPLACEBLOCK, RIBLOCK and BLKREDEF commands?
Tip 14384:Wrong encoding of XLS/CSV/TXT files exported from CAD. Wrong characters on command line.
Tip 14361:Extended ATTOUT/ATTIN for block attribute management in Excel (also for LT).


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:
Save your floating licenses (NLS) consumed by inactive users - free unused licenses with
LogOff 2006 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