TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Amsterdammed on August 09, 2005, 03:14:50 PM
-
Hello everybody,
For the cleaning up of drawings from Builders I would need to be able to change Entities in Blocks with “subst”, no matter how deep they are in the blocks.
Does anybody have a lisp solution for this problem?
Thanks in advance,
Bernd
-
Use nentsel. If you're using ADT use the display props dialog.
-
I have no ADT and i need to do a lot of entities in a lot of dwgs, so I must get to the subentities in a different way.
-
Walk (iterate) and modify the block definitions to suit.
Simplified example:(progn
(vlax-for block
(vlax-get-property
(vlax-get-property
(vlax-get-acad-object)
'ActiveDocument
)
'Blocks
)
;; force all entities within blocks
;; matching "*" name spec to bylayer
(if (wcmatch (vlax-get-property block 'Name) "*")
(vlax-for entity block
(vlax-put-property
entity
'Color
256
)
)
)
)
(princ)
)
-
:D
That's just great MP.
Thank you a lot.
:D
-
My pleasure A'dammed.