Freeze/thaw multiple layers, help

Freeze/thaw multiple layers, help

Anonymous
Not applicable
2,231 Views
3 Replies
Message 1 of 4

Freeze/thaw multiple layers, help

Anonymous
Not applicable

Hi all,

I used to work for a company that would have some command buttons that were custom that they used to freeze and thaw layers based on New Construction work and demolition work. I know that someone wrote a Lisp routine that would do this kind of functioning. 

I now work for a new company that does not have this customization and would love to bring that to the table. I have no idea what i am getting into when trying to write Lisp routines and was wondering if i could get some help getting something written or trying to help me understand how to write it.

Basically I want to be able to create a button on a custom tool bar that will freeze/thaw the layers that pertain to new work and vice versa for demolition work. Right now I am just using freeze layers and thaw all layers. Not very efficient.

At the last company someone wrote a Lisp routine that would reference a notepad will all layers listed in it. is that something that could be done?

Thanks for all help in advance!

0 Likes
2,232 Views
3 Replies
Replies (3)
Message 2 of 4

ВeekeeCZ
Consultant
Consultant
You you have simple macro for layer freezing.

^C^C_-LAYER;_Freeze;OneLayerName,Second,Third;;

Basically if you type this into the command line you will see required syntax. Semicolon (or space) stands for ENTER.
0 Likes
Message 3 of 4

scot-65
Advisor
Advisor
In addition to BeeKee's suggestion:
A macro (as he shows) will work fine.
Grouping of layers are separated with commas.
But first one has to thaw and set the desired layer
before freezing - that is if you decide to freeze all (*).

^C^C-layer;Thaw;0;Set;0;Freeze;*;Thaw;layer1,layer2,layer3,Def*;;

An equivalent:

^C^C-layer;Thaw;0;Set;0;Freeze;*;Thaw;la*,Def*;;

If as macro, consider investigating the use of ^P and ^Q.

Read from an external file for layer names compounds the problem.
It is best to keep it internal, where possible.

???

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes
Message 4 of 4

john.uhden
Mentor
Mentor

Wow!  You have had the best of the best jumping in to help you.

I developed something like that years decades ago.  It really depended on a unified layer naming system allowing for the powerful and efficient use of wildcards.

Long before the National CAD Standards came along, I had developed a layering system that all our employees could easily grasp...

 

PL-CURB = Proposed Line for curbing

EL-TREE = Existing tree line

AH-BLDG = Asbuilt hatch for buildings

DT-PVMT = Demo text for pavement.

etc. etc etc.

 

So you could handle everything in one layer command, such as...

(command ".layer" "T" "*" "S" "0" "F" "P*" "") which would leave all proposed frozen but all existing and demo thawed.

That's just a simple example, but it worked very well.  All our drawings had all the layers already made with color and linetype.  Just occasionally we would run into something unaccounted for, such as an existing bocci court.  Okay... EL-MISC.

Of course my perspective was a bit myopic as all we did was civil engineering; no concern for Archies, EEs or MEs.

I also wrote the first LayerStat program which made it easy to perform lengthy layer commands with just a couple of clicks.

 

To repeat, I think your layer naming convention is the foundation of your success, along with smart layer states.

John F. Uhden

0 Likes