Jump to content

Recommended Posts

Posted

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.

Posted

Use the SETBYLAYER command, Settings to pick what you want set to bylayer.

Posted

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.

Posted
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

Posted

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.

Posted

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.

Posted

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.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...