Jump to content

Change plot style of multiple blocks to bylayer


Recommended Posts

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.

Link to post
Share on other sites

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.

Link to post
Share on other sites
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

Link to post
Share on other sites

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.

Link to post
Share on other sites

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.

Link to post
Share on other sites

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.

Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...