Covert all blocks & blocks ins
Have many blocks & blocks within blocks that we need to convert to '0' layer excluding other entity such as lines,circles,text,dimensions.....inside this blocks.Google and found many lisp & but never one that convert only blocks.
Please assists. What u mean convert block to 0?
Sent from my Lenovo PB1-770M using Tapatalk
Meaning change the blocks & only blocks & blocks within blocks to layer '0' OK...after one eliminates all geometry, all text and all dimensions what's left of a block?
Can you provide us with a copy of one of these mystery blocks?An actual .dwg file not an image file. U dont need kisp for that. Just filter selection
Sent from my Lenovo PB1-770M using Tapatalk (defun C:LAY0 ( / acdoc) (vl-load-com) (setq acdoc (vla-get-activedocument (vlax-get-acad-object))) (vlax-for blk (vla-get-blocks acdoc) (vlax-for obj blk (if (eq (vla-get-objectname obj) "AcDbBlockReference") (vla-put-layer obj "0") ) ) ) (vla-regen acdoc acAllViewports) (princ) )
Hi Remark. nothing particular regarding the blocks. The purpose is we need to delete some entity of some layers using a 'layer delete' lisp routine. Unfortunately some blocks are in that layer, which will get deleted until we can change them all to layer '0'
Unable to since there are may levels of blocks within blocks
hi Stefan. Tested on a small dwg & it works. WIll test on actual dwg soon. Feedback soon. thank again. OK, great...
You might want to filter out Xrefs, Xref's blocks, dim definitions and more...
(defun LAY0 ( / acdoc) (vl-load-com) (setq acdoc (vla-get-activedocument (vlax-get-acad-object))) (vlax-for blk (vla-get-blocks acdoc) (if (and (eq (vla-get-isxref blk) :vlax-false) (not (wcmatch (vla-get-name blk) "*|*,`**")) ) (vlax-for obj blk (if (eq (vla-get-objectname obj) "AcDbBlockReference") (print (vla-get-name obj)) ) ) ) ) (vla-regen acdoc acAllViewports) (princ))
页:
[1]
2