Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Change block layer without block editor

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
Anonymous
33674 Views, 8 Replies

Change block layer without block editor

Hi all,

 

I have 200+ blocks which all have a layer that i don't want.

To change this layer i have to select every block seperately and click 'block editor' change layer and close

 

How can i change all 200+ blocks without opening every block?

 

Gr Robin

 

 

Tags (3)
8 REPLIES 8
Message 2 of 9
TheCADnoob
in reply to: Anonymous

My guess is that you are going to have to get some sort of scripting involved. 

 

Check out this link and see if it helps

 

http://www.cadtutor.net/forum/showthread.php?19161-lisp-for-changing-all-objects-in-a-block-to-layer...

CADnoob

EESignature

Message 3 of 9
Kent1Cooper
in reply to: Anonymous

Would I be correct in assuming that you mean 200+ different Block definitions?  [If you mean a lot of insertions of the same Block, you need to fix it only once.]

 

By "change Layer" in a Block, do you mean you want to change some object  nested in the Block from an unwanted Layer to some other Layer?  That could be automated, but would you want to do it in all  Block definitions in the entire drawing [easier], or only the definitions of certain selected  Blocks [more complicated]?  Is it the same kind of object in all cases?

Kent Cooper, AIA
Message 4 of 9
pendean
in reply to: Anonymous

Why not rename the offending layer something you want/need all the time and call it a day?
Message 5 of 9
Kent1Cooper
in reply to: pendean


@pendean wrote:
Why not rename the offending layer something you want/need all the time and call it a day?

Or, LAYMRG it into the Layer you want, if everything on it is to be changed to the same other Layer.

Kent Cooper, AIA
Message 6 of 9
Johanna_Esteban
in reply to: Anonymous

Hello,

 

If all have the same layer in common, the solution is simple, as long as they are all in the same file.

 

Drag the blocks to the new file, when you have them all create a layer, with the characteristics you want, color, thickness, type of line, etc.
Using "merge layer" (see image) you can select the layer you want to replace the new layer created in the new file.
It will automatically be replaced by the stereo element in the previous layer with the new one.
You will not need to open each one, they will remain as blocks because they were dragged to the new file and this will be a library library.
To use your adjusted files as a new block source, you can use "design center".

 

I hope to give you a light and hope, if you are not clear something please tell me to give you more details.

 

Greetings.



Johanna Esteban

EESignature


Autodesk Expert Elite | Autodesk Certified Professional | AutoCAD Customer Council (Beta Tester for Windows & Mac)

¿Te ha parecido útil este post? ¡Dame Kudos! 😉
Si ha sido resuelta tu inquietud, selecciona 'Marcar como solución' para que otros usuarios la encuentren fácilmente.

Message 7 of 9
Vinayv4v
in reply to: Anonymous

Hello,

 

LAYMRG is a good way to do it as Kent Kooper mentioned. 

But I had some similar issues in the case of blocks where LAYMRG didn't worked.

And I had to use a Lisp to do the Job. Try the Lisp.

 

Cheers,

Vinay Vijayakumaran

Message 8 of 9
Anonymous
in reply to: Vinayv4v

Another quick and dirty way to do this is to select the various blocks, type the EXPLODE command, then you can select the multiple objects and change the layer.  Very quick and easy, but downside is that you will lose the blocks...

Message 9 of 9
gmbutler2
in reply to: Anonymous

I found this post so I wanted to share what I've learned that has helped me with this.  I have a drawing with thousands of blocks on it, I will use Highway Symbols as my example for this but I have many different blocks for many different various symbols and I need them all to be intuitive to the layer properties dialog and not the block itself.

 

When I created this drawing, I had Interstate Symbols, but the source where I compiled the data has them every so many feet which when scaling up the symbols can cause them to become fairly large and overlap each other.  So what I would do previously is take those symbols and I would write the first unique instance of a particular Interstate Symbol (Like Interstate 80 for example) to a layer called Highway Symbol with a color of black, and then all the other instances I would put on a layer called DUP Highway Symbol (Short for duplicate) which would be at a medium gray color so that the symbol would not be as prevalent in the display.  I could then simply grab the symbol and change it to the Highway Symbol layer and it could change color to that layer, theoretically.

 

However, originally all of my Interstate symbol blocks had a layer specified in them as Highway Symbol.  So the blocks placed on the DUP Highway Symbol layer still retained the color of the Highway Symbol layer.  No matter what I did, the color would not change unless I changed the Highway Symbol layer but that changed both sets of symbols (Unique and Duplicates).

 

To fix this issue, I selected the block in the drawing.  It did not matter which block it was because the source of the symbols was that specific block.  I right-clicked and selected 'block editor' to open that block in the drawing.  Then I changed the Layer of that specific block from Highway Symbol to '0'.  Once I saved the block and closed the editor, all the Interstate Symbol blocks that were on DUP Highway Symbol layer were using the medium gray color set by that layer and the Interstate Symbol blocks on the Highway Symbols layer were using the black color that was set by that layer.

 

To make a long story short, if you want all of your blocks to have an intuitive change set by the layer properties dialog, the block elements within said block must be saved on the 0 Layer.

 

I saw in this post where they talked about using the layer merge to change all of your blocks, but if all of your blocks have specific layers in the layer properties, when you merge them that layer with all of its properties set will be removed and you will have to recreate it when you need it.

 

For my fix, I have 87 blocks in my template file and I am just going into each one in the block editor, typing select then all and changing the layer to 0 in all of them.

 

For future block creation, I would draw your block on the layer you want with all of those layer properties set so you get the visual look you want for the block, but before creating the actual block reference, select the elements and change them to Layer 0 so that when you place them, they take on the properties of the layer you are placing them on and not using a static layer set in the block itself.  I made that mistake, I hope this helps others not make that same mistake.

 

Good luck to you all!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


AutoCAD Beta