Hello every one, I am converting some old drawings to new one. I want change many line layers inside many blocks. In detail, I want to filter by line color in many blocks without opening each block. So that I can change all the lines to single layer. Can anyone help me.
Maheshbabu
Not very clear what you want to do.
The best way is to upload a sample drawing showing old and new.
1. Line color can be ByLayer but layers can have different colors. So even if all lines are ByLayer color (same color), they may look different in colors.
2. Changes only apply to LINE object, not other type of objects?
Thanks for the reply.
In my old drawing many blocks are available, each block contain many line types (Example: green color for outer lines, magenta for center lines,cyan for hidden lines), but no layer decipline is followed. At prsent, I am changing the line type by opening each block. Is there any way to change the lines in muliple different blocks at a time. So that it will save huge time.
select 1 layer
& put the comand setbylayer
than i will be same if you want to keep only some than merge the layer
Shavezkhan, thanks for the idea. But the problem is , each block contains different line colors (Example: green color for outer lines, magenta for center lines,cyan for hidden lines), but no layer decipline is followed. For example, layer 2 is used inside the block, then color only changed for green, magenta, cyan, hence layer will be same for all the line colors. I need filter the lines by their color (not by layer), inside the multiple block. Is there any way ?
Thanks once again.
Example:
Do you want to change all line objects in color red, regardless their layers, to a new layer and set these lines' color to ByLayer?
I need to change outer color green to yellow(Outer layer); hidden lines cyan to green(Hidden layer); magenta lines to blue (center layer). So that colors also will be changed and layer displine also maintained. pls. find attached layer file.
If the final result is just to change colors,
eg.
Green -> Yellow,
Cyan -> Green
Magenta -> Blue,
You can try attached CHZ20.vlx and use "Change color to" "By file" option, and select a color matching file.
Save below as a txt file and use it as the color matching file.
3 *2
4 *3
6 *5
@Anonymous wrote:
Hello every one, I am converting some old drawings to new one. I want change many line layers inside many blocks. In detail, I want to filter by line color in many blocks without opening each block. So that I can change all the lines to single layer. ....
Try this BEL0CL.lsp routine [the name stands for Block Elements to Layer 0 with Color and Linetype from their original conditions in the Block. Select one of each Block type you want so edited, and it will dig into their definitions. It could be modified easily enough to change the name of the single Layer it puts things on, and/or to do other things with objects based on what their color and/or linetype are.
Thank for the idea. Not only color change, I want to change,
Green -> Outer layer,
Cyan -> Hidden layer
Magenta -> Center layer
So that layer Discipline will be maintained.
Kent, thanks for the idea. I need to change,
Green -> Outer layer,
Cyan -> Hidden layer
Magenta -> Center layer
So that layer Discipline will be maintained.
@Anonymous wrote:
Kent, thanks for the idea. I need to change,
Green -> Outer layer,
Cyan -> Hidden layer
Magenta -> Center layer
So that layer Discipline will be maintained.
Try the attached modification from BEL0CL [untested] -- I hope I understood correctly what you're trying to do.
@Anonymous wrote:
Thanks kent, but it is not working.
I need more to go on. What is it doing that it shouldn't? What is it not doing that it should? Does regenerating make a difference? etc.
It is not changing the layer or colour.
Pls. find attached drawings. I have attached "old drawing" and "changed new drawing".
Changed new drawing is our requirement. Kidly help me.
Before I dig deeper [I'm out the door now], I notice that your "green" things are not green [color 3] but color 120. Does changing the appropriate 3's in the code to 120's help? Also, the "target" Layers do not exist in the drawing -- they can be created by the (subst) method, but I think they'll be in default color 7 and linetype continuous. Does the routine need to make them?
Green colour I ment is 120 only (Not 3). We need change all the 120 into layer outer(color 2), so that color 120 changed to colour 2 and also layer disipline will be followed. Solution to this issue will be highly appreciated.
@Anonymous wrote:
It is not changing the layer or colour.
....
[Another thread came up today for which that BEL0CL routine ought to have been a solution, but it didn't work right for them, either -- it changed the Layer, but not the color or linetype. I tried it again, and it works here, but I'm on an older version. I'll try on Acad2015 when I get to where I have that, and see whether I can figure out what the problem is.]
You can try attached CHZ20.VLX and Layer Matching Rules example file now.
Settings as below:
You need prepare a txt file contains Layer Matching Rules before running it.
For example, change block subentity in color 120 to Layer "Outer", the rule will be:
((62 . 120)) *Outer
Change block subentity in color 1 AND in "Hidden" linetype to Layer "Middle", the rule will be:
((62 . 1)(6 . "Hidden")) *Middle
That sounds "easy".