Over 1.106.000 registered users (EN+CZ).
AutoCAD tips, Inventor tips, Revit tips, Civil tips, Fusion tips.
Try the new precise Engineering calculator.
New AutoCAD 2026 commands and sys.variables and env.variables,.
Discussion forum
?CAD discussions, advices, exchange of experience
CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.
Please abide by the rules of this forum.
This is a peer-to-peer forum. The forum doesn't replace the official direct technical support provided by ARKANCE for its customers.
How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
|
Post Reply
|
| Author | |
Xsoldier2000
Newbie
Joined: 14.Jul.2008 Status: Offline Points: 2 |
Topic: Freeze Layers containing spaces?Posted: 14.Jul.2008 at 20:22 |
|
I'm trying to write a script to mass freeze certain layers in my drawings, but because we receive drawings from an architect, they contain spaces (eg. THIS LAYER|Pool Competition$10$1-pool)
Any idea how this might be done? As AutoCAD scripts read spaces as an ENTER key I can't just copy/paste the layer name. Also, when I insert a %20 (normally used for a space) AutoCAD reads it as part of the layer name. Any Help? Or maybe I should be looking into a LISP? I honestly don't know the first thing about writing a LISP though. Thanks for any help possible. |
|
![]() |
|
Vladimir Michl
Moderator Group
Arkance Systems CZ Joined: 26.Jul.2007 Location: Czech Republic Using: Autodesk software Status: Offline Points: 2144 |
Posted: 14.Jul.2008 at 21:08 |
|
There is no need for a LISP - a plain macro:
_-LAYER _Freeze * *
will work.
You can use spaces in layer names (in scripts) as long as the EXTNAMES variable is set to 1.
|
|
|
Vladimir Michl (moderator)
ARKANCE - https://arkance.world - Autodesk Platinum Partner |
|
![]() |
|
Xsoldier2000
Newbie
Joined: 14.Jul.2008 Status: Offline Points: 2 |
Posted: 14.Jul.2008 at 21:17 |
|
Ok, my EXTNAMES is set to 1 (allowing for AutoCAD 2000(+) parameters)
An example of my script: -layer F *|Competition Pool$0$SP-CP-WP-2-ROPE f *|s-grid-iden-384 When running the script it still stops after the Competition when trying to freeze *|Competition Pool$0$SP-CP-WP-2-ROPE. (eg. [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck /Unlock/stAte/Description/rEconcile]: F Enter name list of layer(s) to freeze or <select objects>: *|Competition No matching layer names found.) BTW, I am using AutoCAD 2008. Thank you again for any help. Update: I just found this...Will try it our tomorrow.
To quickly replace spaces in layer names use the following For Each objLayer In ThisDrawing.Layers : objLayer.Name=Replace(objLayer.Name, " ", "_") : Next Edited by Xsoldier2000 - 14.Jul.2008 at 21:24 |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
This page was generated in 0,145 seconds.
![CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]](/common/arkance_186.png)


Freeze Layers containing spaces?
Topic Options


