Message 1 of 3
nestedblock to by block
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
i have this lisp and i want work with nested blocks, now don't work with them.please help me. thanks
(defun C:BlkEdit (/ Drawing ent blk)
(vl-load-com)
(setq Drawing (vla-get-activedocument (vlax-get-acad-object)))
(if (/= (getvar 'refeditname) "")
(progn
(setq blk (vla-item (vla-get-blocks Drawing) (getvar 'refeditname)))
(vl-cmdf "_.Refclose" "S")
(vlax-for x blk
(vla-put-Color x 6)
)
(vla-Regen Drawing acAllViewports)
)
(progn
(if (eq (cdr (assoc 0 (setq ent (entget (car (entsel "\nSelect Blocks")))))) "INSERT")
(progn
(setq blk (vla-item (vla-get-blocks Drawing) (cdr (assoc 2 ent))))
(vlax-for x blk
(vla-put-Color x 256)
)
(sssetfirst nil (ssadd (cdr (assoc -1 ent))))
(vl-cmdf "-REFEDIT" "O" "A" "N")
)
(Prompt "\nNothing Selected")
)
)
)
(princ)
)