TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: lamarn on October 03, 2019, 05:30:11 PM
-
Hi i am trying to set all my viewports back or front
Based on this code of Lee Mac.
(LM:movetobottom (ssget "x" (0 . "VIEWPORT")))
(LM:movetotop (ssget "x" (0 . "VIEWPORT")))
Why doesn't this work, is this an invalid input?
error: Automation Error. Invalid input
http://www.lee-mac.com/draworderfunctions.html
-
You will need to exclude Modelspace viewports and the Paperspace viewport itself; you are also missing a couple of parentheses and a quote preceding the ssget filter list. You will also need to operate on each layout at a time since my functions assume the objects have the same owner.
For example:
(LM:movetobottom
(ssget "_X" (list '
(0 .
"VIEWPORT") (cons 410 (getvar 'ctab
)) '
(-4 .
"<>") '
(69 .
1))))
-
Thank you very much.
If tried to use your commands a couple of times but i think "move to top" / "move to bottom" gives other results than "draworder back/front"
Anyway, this works for me now.
(command "draworder" (ssget "_X" (list '(0 . "VIEWPORT") (cons 410 (getvar 'ctab)) '(-4 . "<>") '(69 . 1))) "" "back")