Use the SETBYLAYER command, Settings to pick what you want set to bylayer.
Registered forum members do not see this ad.
Hi,
I need a lisp routine to change the plot style of blocks in my drawing to 'bylayer' rather than the selected plot styles that they have been put on when they were created (by others). I would really appreciate if anyone had a lisp routine that would do this easily as there are many blocks in my drawings that need to be changed and going through the block editor is very time consuming.
I have a lisp routine that can change the colour to one of my choosing but as I am not very good at lisp I do not know how to edit it to do the plot style rather than colour.
Any help is greatly appreciated.




Use the SETBYLAYER command, Settings to pick what you want set to bylayer.
"You are entitled to your own opinion but you are not entitled to your own facts." Daniel Patrick Moynihan
Thanks for the reply, but I did try to use the SETBYLAYER command afetr reading another thread but it did not work.
I went to SETBYLAYERMODE and chose the integer as 16 which changes all of the entities in my drawing to BYLAYER but for blocks that have the plotstyle set within the block editor as a particular style did not change. I don't know if I am doing something wrong but it didn't seem to be able to do what i was after. The blocks are still showing up as the different plotstyles when I go to print and I think this is because it is plotting off of the nested style rather than the layer that they are on within my drawing.
I think I need a lisp that will go into each block and change the plotstyle within the block. As i said I have one that does this exact thing for me but with the colour rather than the plotstyle, I just don't know how to convert it or write a new one to do what I need.


do you want to make the block to By Layer and By Color?
try FixBlock.lsp
"Memories fade but the scars still linger...."
Don't worry, I had a bit more of a play around with the SETBYLAYER command and got it to work. I must have been doing something wrong the first time around.
Thank you for your help.




Is your VISRETAIN variable set to 1?
Try saving and closing the drawing, then reopen it,
and check if it is still as you saved it, or whether those settings may have reverted to the earlier settings.
Volume and repetition do not validate opinions forged in the absence of thought.
Registered forum members do not see this ad.
Yes my VISRETAIN is set to 1. I don't know why it wasn't working the first time that I tried but second time round it worked perfectly.
Thanks again for the help.
Bookmarks