Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dear all,
I found this routine somewhere, since i dont know how this work, hopefully some one can provide a solution..
how do i change below routine, instead using move, it will be better using flatten command. i use this so far so good. but any 3d object, i will need to do it manually flatten.
(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)
In other word, It is flatten in nested block. flatten all item inside block, including block inside.
I do find others routine like "superflatten1.1.lsp" but that file wont do much, it stop when some block is missing or cannot be find, or found error. then if it error, some object will be missing.
Solved! Go to Solution.