Hello everyone,
I hope to find some help here. I have searched the internet but cannot find a workable (understandable) solution, one that I can get started with, for example.
My challenge:
Suppose I have many blocks with many different block names, but they all have attributes and one of the attributes TAG is called "GROUP".
I would like to use a selection set and go through all the blocks to find out what value the TAG "GROUP" has.
If the value is "1" then I want to change the layer the block is on to "blah blah 1". If the value is "2" then "bladibla2".
The most ideal way would be to have some kind of list:
(setq CHANGES '(
( "1" . "Bla Bla 1")
( "2" . "Bladibla 2")
( "3" . "My layername 3")
( "4" . "My layername in case of 4")
)
)
And if there is no TAG "GROUP" in the block or if the value is not one of those in the list nothing should happen.
I have found a kind of close to solution lisp
https://www.cadtutor.net/forum/topic/34583-move-blocks-to-other-layer-by-attribute-value/#comment-280640 but I do not understand the vlax/mapcar/lambda function. That said, it is my bad to not be able to find a solution myself therefor my request for help.
Thanks for those who are willing to help me out.