Jump to content

Selecting entities using the draw order


teknomatika

Recommended Posts

Already, another challenge for experts from LIPS: In working with various entities

overlaid with different colors and layers, you can get a selection of colors of visible entities in the upper layer, ignoring the entities of the same color located in a lower draw order?:)

Link to comment
Share on other sites

You could perhaps use the methods of the SortEnts Table, which can be obtained using:

 

;;------------------=={ Sortents Table }==--------------------;;
;;                                                            ;;
;;  Retrieves the Sortents Table object.                      ;;
;;------------------------------------------------------------;;
;;  Author: Lee Mac, Copyright © 2010 - www.lee-mac.com       ;;
;;------------------------------------------------------------;;
;;  Arguments:                                                ;;
;;  space - VLA Layout Block Object                           ;;
;;------------------------------------------------------------;;
;;  Returns: Sortents Table Object, else nil                  ;;
;;------------------------------------------------------------;;

(defun LM:SortentsTable ( space / dict ) (vl-load-com)
 ;; © Lee Mac 2010

 (defun _catchapply ( foo args / result )
   (if
     (not
       (vl-catch-all-error-p
         (setq result
           (vl-catch-all-apply foo args)
         )
       )
     )
     result
   )
 )
 
 (cond
   (
     (_catchapply 'vla-item
       (list
         (setq dict
           (vla-GetExtensionDictionary space)
         )
        "ACAD_SORTENTS"
       )
     )
   )
   (
     (_catchapply 'vla-AddObject
       (list dict "ACAD_SORTENTS" "AcDbSortentsTable")
     )
   )
 )
)

 

A few examples here:

 

http://lee-mac.com/draworderfunctions.html

 

But I don't completely understand the question.

 

Lee

Link to comment
Share on other sites

Lee Mac,

tanks.

 

As for your routine:

What is the command to call the routine?

 

As for my question.

I'll try to explain by example image.

vza443.jpg

Link to comment
Share on other sites

As for your routine:

What is the command to call the routine?

 

It's a subfunction (not a command) it requires an argument (VLA Layout Block Object) and returns the SortEnts Table Object.

 

Take a look at the link to see how it can be called.

Link to comment
Share on other sites

  • 1 month later...

To me it looks like he wants to be able to select the object which is in FRONT of other objects

when there are several objects overlaid upon one another.

 

When he said...

 

you can get a selection of

 

I think he meant CAN you get a selection of...??

 

 

This one is definitely going to need clarification...

Link to comment
Share on other sites

If it's selecting the wrong object of an overlapping group, just use Shift+Spacebar to cycle through the items to find the one you want.

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