Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to seperate layers by colour? 2

Status
Not open for further replies.

danieldoral

Structural
Aug 11, 2002
32
Hey,

Have this problem. Im using ACAD 14 at the office.

My new draftman keeps commiting the mistake of using only one or two layer and merely chnaging the colours of these layers when drawing different parts of a plan (eg. door=cyan, wall=red, column=green but all on layer=wall).

This makes it really difficult when im rediting the drawings, cus when i turn of one of the layers many of the objects of various colours are turned off as well.

1. Is there a way of separating the colours into different layers without manually clicking each object?
2. Can i just switch off a particular colour and not the whole layer?

Thanks

Daniel
 
Replies continue below

Recommended for you

hi
I usually have this problem
I will solve this problem in next few days by lisp routine
I suppose make some separate layers
ex: door is orginal layer and color bylayer is yellow
so red color in layer door1
cyan color in layer door4

Do you have any advice?
 
Have your draftsman copy all the same colors on to a separate layer on his own time. Chances are your problem will be soon sovled. ;-)
 
Go Ralph!
I think cad123 can solve your problem with
a lisp routine by searching on the color
regardless of layer. I did enjoy Ralph's
answer. It sounds like you have a serious
communication problem with your employees
or coworkers. If you explain why you think
it is important that your procedure be followed,
I think it will be adopted joyously by the drafter.
 
Hey guys,

Thanks for the replies. Yeah i've been telling him too many times, its just that he's kinda unfamilar with the proper usage of the program and the english language to i guess. ;P

Ummm and now one more kinda embarassing question, can someone please tell me everything i need to know about lisp routines etc. I am totally unfamiliar with it. Everything about it ;)

Thanks
 
Autolisp files are automatic command files that
can be run in acad with the load command.
Like (load"xxxx") where xxxx.lsp is the actual
autolisp file and in your acad directory else
you have to list something like (load"c:/acad/xxxx")
where the xxxx.lps file resides. The backslash is
correct as shown. In dos it would have been a forward
slash, but in acad it must be the opposite.
After the command is executed, you can type xxxx or
whatever the name of the lisp file is and it will
run. You might search and see if there any lisp files
in you acad directory and try loading them just to
get some idea of how to use them. They are active
as a command file unless you exit acad.
If you must do your layer change command manually for
the layer change. I would turn the layer off that
you want to change the items to and the using the
change command and select the items and have them
disappear until you are done and then turn that layer
back on. I hope this was clear.
 
hi
I post my lisp here. can you have a look and give some comment to improve it. I feel it's speed a litle slow.

type appload in command and choice this file
;----------------------
;SEP.lsp This program use to separate layer with colour not bylayer
;Made by cad123, 1 Dec 02
(princ "\nType SEP to start")
(defun C:sep()

(setq e(car(entsel "Pick On Grounp Layer To select:\n" )))
(setq e(entget e))
(setq n(cdr(assoc 8 e)))
(setq nn(ssget "x" (list(cons 8 n))))
(princ "\n Wait few minutes")
(princ " ")
(command "select" nn "")


(setq co 1)
(while (< co 256)
(setq ss (ssget &quot;x&quot; (list (cons 8 n)(cons 62 co))))
(if (null ss) (setq co (1+ co))
(progn
(setq cname (itoa co))
(setq lname(strcat n cname))
(command &quot;.layer&quot; &quot;m&quot; lname &quot;c&quot; co &quot;&quot; &quot;&quot;)
(command &quot;.chprop&quot; ss &quot;&quot;
&quot;C&quot; &quot;bylayer&quot; &quot;la&quot; lname &quot;&quot;)
);end progn
);end if
);end while


)
;-----------------------------------
Enjoy it
 
Hey Cad,

Im sorry but i don't know what to do with this set of codes, How do i use it?

Thanks
 
hi daniel
Just copy between
;------
;SEP.lsp This program use to separate layer with colour not bylayer
;Made by cad123, 1 Dec 02
(princ &quot;\nType SEP to start&quot;)
--------------------
-------------------
);end while
)
;-------

and name it : sep.lsp ( you can use notepad)
after that use appload command and load this file ( sep.lsp)
( if you want know clearly you should go to help and find down what you don't know )
Hope you will do,

 
Another method to try ...
It's not that fancy like the LISP but it's still effective.
(A poor man's method)

Type FILTER
sort/ select by color

Setup a selection set by color
Once you do that ....
Run the filter to select objects by color
Once the objects are selected ... simply pull down the layers from the standard toolbar ... and the objects SHOULD MOVE TO THAT LAYER!

Repeat the step over and over until you're done!

It ain't fancy but it should get the work done quickly.

Later.
Rich
 
another way to select everything in the drawing of one color is by using &quot;quick select&quot; (in 2002)
One thing to remember when using this though is that if you are selecting everything that is color &quot;red&quot; it won't select itmes that are color &quot;bylayer&quot; even if they happen to be red because of what layer they are on.
Does that make sense?
 
Hey

Thanks for all the tips....... they works .... thansk a mil!

Cad: How do you write these lisps? Do you need a special programe? Any tutorial on the net? Where can I get more lisps?

Thanks again!
 
hi daniel
I use Visual lisp program( but I only research Autolisp). This works very well and this program include AutoCad from 2000 up. And lisp have a lot of website but ;) good lisp not free. So if you want learn it , you should use a book in your language, I study by myself too.
If you want learn online I show one site:

Hope you will become a expert.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor