Jump to content

Draw Order?


criehle

Recommended Posts

Is there an easy way to manipulate the draw order of all objects in a layer with out selected every object and then sending them to the front or back or is this the only way to display the draw order and keep it that way?

Link to comment
Share on other sites

I downloaded a lsp routine that sends all the objects of a layer to the back... i use it for hatching... i dont think there is something like what you describe. unless you isolate the layer then do what you want....

Link to comment
Share on other sites

A LISP routine may help as EMS mentioned - something like this maybe:

 

(written quickly & untested):

 

(defun c:layback (/ ent ss)
 (if (setq ent (car (entsel "\nSelect Object on Layer to Send to Back...")))
   (progn
     (setq ss (ssget "X" (list (cons 8 (cdr (assoc 8 (entget ent))))
       (if (getvar "CTAB")(cons 410 (getvar "CTAB"))
             (cons 67 (- 1 (getvar "TILEMODE")))))))
     (command "_draworder" ss "" "_Back"))
   (princ "\n<!> No Object Selected <!>"))
 (princ))

Link to comment
Share on other sites

Don't forget the Express tools command SSX.

It allows you to select a layer by name (among other things, check command line).

Then do draworder, when select objects, type P for previous and the layer from SSX is selected and can be manipulated.

Link to comment
Share on other sites

tested just enough to make sure it works:

(defun c:DO (/ #Choice #Entsel #Entget #Layer #ssget)
 (setvar "cmdecho" 0)
 (setvar "errno" 0)
 (initget 0 "Back Front")
 (setq #Choice (getkword "\nDraworder Option [back/Front] <Back>: "))
 (progn
   (if    (not #Choice)
     (setq #Choice "Back")
   ) ;_ if
   (while
     (and
   (not
     (eq (getvar "errno")
         52
     ) ;_ eq
   ) ;_ not
   (not #Entsel)
     ) ;_ and
      (setq
    #Entsel (entsel (strcat "\nSelect object on layer to move to "
                #Choice
                ": "
            ) ;_ strcat
        ) ;_ entsel
      ) ;_ setq
      (if #Entsel
    (progn
      (setq #Layer (cdr (assoc 8 (entget (car #Entsel)))))
      (setq #ssget    (ssget "_x"
                  (list (cons 410 (getvar "ctab"))
                    (cons 8 #Layer)
                  ) ;_ list
           ) ;_ ssget
      ) ;_ setq
      (vl-cmdf "_.draworder" #ssget "" #Choice)
      (prompt (strcat "\nAll "
              (rtos (sslength #ssget) 2 0)
              " object(s) on layer \""
              #Layer
              "\" have been moved to "
              #Choice
          ) ;_ strcat
      ) ;_ prompt
    ) ;_ progn
      ) ;_ if
   ) ;_ while
 ) ;_ progn
 (princ)
)

Link to comment
Share on other sites

Map 3D doesn't have the acad command QSELECT?

 

The reason I ask is because I know that's one command that is very undervalued as well as underused in plain Autocad.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...