I may be way off the mark here, but have you tried the LISP with all your OSNAPs off?
from quickly glancing at the LISP on the hyperlinked threads, I notice that it doesn't turn OSNAPs off before moving the entities...![]()
Registered forum members do not see this ad.
I've been using the lisp from THIS thread since i got it.
Up untill now have not had any problems, howevey when
i used it today, looking at everythin from the side, it has l
eft entities on 3 distinct elevations,
Any clue's on why this is happening now?
F.Y.I. this is a BIG drawing
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. - Albert Einstein
SET FILEDIA = 1
I may be way off the mark here, but have you tried the LISP with all your OSNAPs off?
from quickly glancing at the LISP on the hyperlinked threads, I notice that it doesn't turn OSNAPs off before moving the entities...![]()
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper
Also, check that the entities are not on locked layers, as this will also cause a problem.
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper
This should cope with R14, and also with objects on locked layers:
Code:(defun c:flat (/ ss ssObj i j) (vl-load-com) (if (setq ss (ssget "X" (list (if (getvar "CTAB") (cons 410 (getvar "CTAB")) (cons 67 (- 1 (getvar "TILEMODE"))))))) (progn (setq ssObj (mapcar 'vlax-ename->vla-object (mapcar 'cadr (ssnamex ss))) i 0 j 0) (foreach Obj ssObj (foreach n '(1e99 -1e99) (if (vl-catch-all-error-p (vl-catch-all-apply '(lambda (x) (vla-move x (vlax-3d-point (list 0 0 0)) (vlax-3d-point (list 0 0 n)))) (list Obj))) (setq i (1+ i)) (setq j (1+ j))))) (princ (strcat "\n" (rtos (/ j 2.0)) " Objects Flattened" (if (zerop i) "." (strcat ", " (rtos (/ i 2.0)) " were on a Locked Layer!"))))) (princ "\n<!> No Objects Found <!>")) (princ))
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper
Thanks 4 the tips - i'll try them tomorraz when I get to work
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. - Albert Einstein
SET FILEDIA = 1
Good stuff, let me know how you get on![]()
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper
Will do - won't be untill afternoon tho - am at limb centre in mornin gettin me new leg (Hopefully)
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. - Albert Einstein
SET FILEDIA = 1
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper
Only once a year! LOL![]()
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. - Albert Einstein
SET FILEDIA = 1
Registered forum members do not see this ad.
Alternatively, this will unlock all layers before performing the flatten:
Code:(defun c:flat (/ laylst ss ssObj j) (vl-load-com) (vlax-for lay (vla-get-layers (vla-get-ActiveDocument (vlax-get-acad-object))) (setq laylst (cons lay laylst))) (mapcar '(lambda (l) (vla-put-lock l :vlax-false)) laylst) (if (setq ss (ssget "X" (list (if (getvar "CTAB") (cons 410 (getvar "CTAB")) (cons 67 (- 1 (getvar "TILEMODE"))))))) (progn (setq ssObj (mapcar 'vlax-ename->vla-object (mapcar 'cadr (ssnamex ss))) j 0) (foreach Obj ssObj (foreach n '(1e99 -1e99) (if (vl-catch-all-error-p (vl-catch-all-apply '(lambda (x) (vla-move x (vlax-3d-point (list 0 0 0)) (vlax-3d-point (list 0 0 n)))) (list Obj))) nil (setq j (1+ j))))) (princ (strcat "\n" (rtos (/ j 2.0)) " Objects Flattened."))) (princ "\n<!> No Objects Found <!>")) (princ))
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper
Bookmarks