BIGAL Posted October 24, 2021 Share Posted October 24, 2021 (edited) Ok a new lesson (setq ent (ssname ss (setq x (1- x)))) this retrieves the block to change so set the layer as the next line (setvar 'clayer (cdr (assoc 8 (entget ent)))) ; sets layer to blk layer, same for color. Need to redo the way the code works select all blocks and do the ODget for each single block and set layer etc. Its all there just needs to be reshuffled around. I only did 1 block name rather than different block names with different OD data. Maybe later today. Edited October 24, 2021 by BIGAL Quote Link to comment Share on other sites More sharing options...
Jest Posted October 25, 2021 Author Share Posted October 25, 2021 (edited) 13 hours ago, BIGAL said: Ok a new lesson (setq ent (ssname ss (setq x (1- x)))) this retrieves the block to change so set the layer as the next line (setvar 'clayer (cdr (assoc 8 (entget ent)))) ; sets layer to blk layer, same for color. Need to redo the way the code works select all blocks and do the ODget for each single block and set layer etc. Its all there just needs to be reshuffled around. I only did 1 block name rather than different block names with different OD data. Maybe later today. Hi I have found another lisp program, which replaces block with another block (see attachment). It works fine with OD and different layers. Can you look at it, so it would maybe help you complete ODBLK lisp? p.s. I've tried to do you new lesson. I couldn't figured out where to put it or what line to replace. Tried many combinations...no success.. rblock.zip Edited October 25, 2021 by Jest Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 26, 2021 Share Posted October 26, 2021 As part of learning you need to compare using entsel for 1 item v's SSGET for multiple items. The question of how to convert a single to multiple is probably asked ever 3 months. It is not that hard. Just look at code examples here that have ssget. Don;t be afraid to post what does not work. Plenty here to help. Quote Link to comment Share on other sites More sharing options...
Jest Posted October 28, 2021 Author Share Posted October 28, 2021 On 10/26/2021 at 2:12 AM, BIGAL said: As part of learning you need to compare using entsel for 1 item v's SSGET for multiple items. The question of how to convert a single to multiple is probably asked ever 3 months. It is not that hard. Just look at code examples here that have ssget. Don;t be afraid to post what does not work. Plenty here to help. It works now. I had some problems with anonymous block names, but I've found the solution. Thanks again for your help! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.