lock draw order for particular objects

lock draw order for particular objects

barry2104
Collaborator Collaborator
878 Views
4 Replies
Message 1 of 5

lock draw order for particular objects

barry2104
Collaborator
Collaborator

I have a JPG which i needed to insert into my dwg, say for example a house footprint, upon which I want to draw in (add on top) the electrical System and plumbing objects.

I want to somehow lock down the jpg to the bottom of the draw order (permanently) so that whilst adding lines/text on top of this jpg, I can say, move one line that i drew last to sit behind everything else in the drawing EXCEPT the jpg.

Without the jpg i would simply click once on "´move to bottom" rather than "move below (selected object(s))" because I don't want to select everything and have to then un-select the jpg object.

 

Is it possible somehow to click on "move to bottom" and have the selected object moved not quite to the bottom?

Like a draw-order-override to lock down particular/selected objects...

Running AutoCAD Architecture 2020, in German
0 Likes
879 Views
4 Replies
Replies (4)
Message 2 of 5

ВeekeeCZ
Consultant
Consultant

Probably the most easy way would be to make your own MoveToBack button (or LISP command of course) which will somehow always include your image/s or always does perform MoveBack once more with image/s only. Maybe named group?

0 Likes
Message 3 of 5

barry2104
Collaborator
Collaborator
That is a good idea, to make a LISP named MTB (move to back) which moves the selected object(s) to the back but before carrying out the draw order part of the lisp, it searches the drawing for (model-space) based picture files like JPGs, OLEs, TIFFs, PNGs, etc
Running AutoCAD Architecture 2020, in German
0 Likes
Message 4 of 5

ВeekeeCZ
Consultant
Consultant

Ok, let's try this.

 

(defun c:MTB ( / ss is)
  
  (if (setq ss (ssget "_:L"))
    (progn
      (command "_.DRAWORDER" ss "" "_Back")
      (if (setq si (ssget "_A" (list '(0 . "IMAGE,OLE2FRAME") (cons 410 (getvar 'CTAB)))))
        (command "_.DRAWORDER" si "" "_Back"))))
  (princ)
  )

 

0 Likes
Message 5 of 5

dbhunia
Advisor
Advisor

For .......

 


@barry2104 wrote:
That is a good idea, to make a LISP named MTB (move to back) which moves the selected object(s) to the back but before carrying out the draw order part of the lisp, it searches the drawing for (model-space) based picture files like JPGs, OLEs, TIFFs, PNGs, etc

 

Also can try this.......

 

(defun C:mtb ( / ss ct)
(setq ct (getvar 'CTAB))
(if (setq ss (ssget "_A" '((0 . "IMAGE,OLE2FRAME") (410 . "Model"))))
    (progn
	(setvar 'CTAB "model")
    	(command "_DRAWORDER" ss "" "_BACK")
	(setvar 'CTAB ct)
    )
)
)

Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
0 Likes