Message 1 of 5
Allflat.lsp mesh with dinamic blocks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Found this code from Lee Mac on this site https://www.cadtutor.net/forum/topic/49101-automate-flattening-all-entities-residing-inside-blocks/
The problem is tha this lisp makes a mess with dinamic blocks...
Attached 2 files after and before using allflat
(defun c:allflat ( / d )
(vlax-for b (vla-get-blocks (setq d (vla-get-activedocument (vlax-get-acad-object))))
(if (= :vlax-false (vla-get-isxref b))
(vlax-for o b
(if (vlax-write-enabled-p o)
(foreach e '(1e99 -1e99)
(vlax-invoke o 'move '(0.0 0.0 0.0) (list 0.0 0.0 e))
)
)
)
)
)
(vla-regen d acallviewports)
(princ)
)
(vl-load-com) (princ)
Any ideas how to fix this?