Jump to content

Recommended Posts

Posted

I have a drawing with many hatches on the same layer. I need a lsp that will allow me to select one of the hatches and send the entire layer to the back. Any ideas?

Posted

yes, i am dealing with many areas of concrete pavement all with a hatch. I have many utilities and such that are below the walk hatch and i need to be able to send the entire layer to the back (draw order) as opposed to sending each hatch back one section at a time.

Posted

This should do the trick - will work on any entity:

 

(defun c:hatchback (/ lEnt lLay lSels)
 (setvar "cmdecho" 0)
 (while (setq lEnt (car (entsel "\nSelect Entity on Layer to Send to Back > ")))
     (setq lLay (cdr (assoc 8 (entget lEnt)))
       lSels (ssget "X" (list (cons 8 lLay)(if (getvar "CTAB")
                                         (cons 410 (getvar "CTAB"))
                                        (cons 67 (- 1 (getvar "TILEMODE")))))))
     (command "_.draworder" lSels "" "B"))
 (setvar "cmdecho" 1)
 (princ))

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...