I am going to the block table to get the definitions for each entity in a block, and then I want to entmake each entity.
I am recreating the explode command so I can pass extended data from a block to some "undisclosed location".
first test, there are entities with linetype BYBLOCK, and some entities with a forced colour. I tried this:
(entmake (list '(0 . "LINE")
'(100 . "AcDbEntity")
(assoc 8 data)
(if (assoc 62 data) (assoc 62 data))
(assoc 6 data)
'(100 . "AcDbLine")
(cons 10 (tran 10))
(cons 11 (tran 11))
)
)
so that if the colour is forced, it will recreate it correctly. but when it is bylayer in the block definition there is no (assoc 62 data), and it returns a nil in the middle of my list - which entmake really does not like so very much. obviously, the (assoc 6 data) will have the same problem.
...................... sometimes stating the problem is all I need. now I have:
(entmake (append (list '(0 . "LINE")
'(100 . "AcDbEntity")
(assoc 8 data))
(if (assoc 62 data) (list(assoc 62 data)))
(if (assoc 6 data) (list(assoc 6 data)))
(list '(100 . "AcDbLine")
(cons 10 (tran 10))
(cons 11 (tran 11))
))
)
because the append wipes the nils in my list.
but I would still like to know how to pass BYLAYER to entmake.
thanks.