Attila The Gel Posted January 13, 2009 Posted January 13, 2009 Hi all, I was wondering how to set the right layer while you are drawing a line. (if this is possible off course) Lets say I have 2 line colors (blue and red) in a layer called "Y" and I'm currently drawing in another layer called 'X'. Here's what I would like to do if possible. Whilst I'm in layer 'X' I want to start a line but I want it to change to the Layer 'Y' and the color RED by clicking on the red line of that layer that is already in the drawing. Therefore not always go to the layer after I draw the lines or before I draw the lines. I hope the badly formed text above thx Quote
skipsophrenic Posted January 13, 2009 Posted January 13, 2009 i don't know if this is what you're askin soz, but it reads like 1. draw line on layer 'x' an colour blue, 2 while drawing line realise should be on layer 'y' and colour red 3 change it in mid-command to save changing later? Is this what you're getting at? Quote
Attila The Gel Posted January 13, 2009 Author Posted January 13, 2009 Thats about it skipsophrenic! Nice. Is there some way to do this? Quote
rkent Posted January 13, 2009 Posted January 13, 2009 I found this old routine I use for changing layers by picking. I changed it to work transparently and it seems to work. So you load the file each time, through appload for example, and then after you have started the line command you can type 's "enter", pick a line on a layer you want to draw on and continue. (defun C:S (/ e n);set current layer by picking entity (setq e (car (entsel "Set Current Layer...\nPICK OBJECT: "))) (if e (progn (setq e (entget e)) (setq n (cdr (assoc 8 e))) (command "'.LAYER" "SET" N "") )) ) Quote
Attila The Gel Posted January 13, 2009 Author Posted January 13, 2009 I found this old routine I use for changing layers by picking. I changed it to work transparently and it seems to work.So you load the file each time, through appload for example, and then after you have started the line command you can type 's "enter", pick a line on a layer you want to draw on and continue. (defun C:S (/ e n);set current layer by picking entity (setq e (car (entsel "Set Current Layer...\nPICK OBJECT: "))) (if e (progn (setq e (entget e)) (setq n (cdr (assoc 8 e))) (command "'.LAYER" "SET" N "") )) ) Thx. I'll try this out tomorrow and let you know! But does it also copy the linetype and color when you pick an object? Quote
rkent Posted January 13, 2009 Posted January 13, 2009 Thx. I'll try this out tomorrow and let you know! But does it also copy the linetype and color when you pick an object? This simply changes to another layer that you select. The color should be set bylayer as well as linetype. Maybe we aren't understanding what you are really after. Quote
Jaelin Posted January 13, 2009 Posted January 13, 2009 I've worked up a toolpallette to cover for my purposes what i think might help you. It won't allow you to change in the middle of drawing a line but it will allow you to draw a line on a different layer without changing your layer. Hopefully I can explain this to where you understand what I'm doing. This takes a while to setup but if your using consistent layering on every job like I do it comes in handy for me. I took the a flyout that consists of 8 draw commands: line, arc, circle, ellipse, polyline, ray, spline and constuction line. Typically I only use the line, arc, circle, polyline and spline commands. I took that flyout and dropped it into a tool pallette I named linework. I then copied that flyout multiple times into that same tool pallette. In my case about 30 times. I then went into each of those flyouts and edited the properties of the flyout. I changed the name of the flyout to correspond with the layer, I selected the Layer I wanted to tie the flyout to and then put all the other settings on "ByLayer." What this resulted in for me is all I have to do is now click on the button for the flyout and I can draw a line of that type and color then immediately click a different flyout and draw a line of another type/color. It cut my time in half almost drawing linework for what I do. Hopefully this will help you. Quote
skipsophrenic Posted January 13, 2009 Posted January 13, 2009 Lee Mac i'v not seen anythin like u're askin, but maybe if you tweaked atilla's code?...... Quote
Attila The Gel Posted January 14, 2009 Author Posted January 14, 2009 I found this old routine I use for changing layers by picking. I changed it to work transparently and it seems to work.So you load the file each time, through appload for example, and then after you have started the line command you can type 's "enter", pick a line on a layer you want to draw on and continue. (defun C:S (/ e n);set current layer by picking entity (setq e (car (entsel "Set Current Layer...\nPICK OBJECT: "))) (if e (progn (setq e (entget e)) (setq n (cdr (assoc 8 e))) (command "'.LAYER" "SET" N "") )) ) I've tried this code, but it doesn't seem to work? Its loads succesfully but when I start a line and type 's' and enter it doesn't ask to pick an object? The application is in the all loaded applications of appload but it is in a grey color. does this mean that it's not active? This simply changes to another layer that you select. The color should be set bylayer as well as linetype. Maybe we aren't understanding what you are really after. No no, we understand each other. Its just that I sometimes have 2 or 3 different linetypes/colors in one layer. thats why I was wondering if it also could copy the linetipe and color of the object I pick. Quote
bonehead411 Posted January 14, 2009 Posted January 14, 2009 No no, we understand each other. Its just that I sometimes have 2 or 3 different linetypes/colors in one layer. thats why I was wondering if it also could copy the linetipe and color of the object I pick. Forgive me for asking, but is it not simple enough just to use MATCHPROP? You can't use it mid command, but it's simple nonetheless, and does what you're asking above. Quote
Attila The Gel Posted January 14, 2009 Author Posted January 14, 2009 Forgive me for asking, but is it not simple enough just to use MATCHPROP? You can't use it mid command, but it's simple nonetheless, and does what you're asking above. Man, where where you all this time? Thx for all the help! I knew it was to simple! Quote
bonehead411 Posted January 14, 2009 Posted January 14, 2009 My pleasure ATG, I'm good at the easy stuff. Go on, ask me another!! Quote
Attila The Gel Posted January 14, 2009 Author Posted January 14, 2009 I still wonder how I never seen this easy command? It even took me a wile to find it in the toolbars. But why did they put it in the standard toolbar anyways?? I moved it to the draw toolbar! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.