Selecting object inside the block

Selecting object inside the block

eakos1
Advocate Advocate
2,202 Views
23 Replies
Message 1 of 24

Selecting object inside the block

eakos1
Advocate
Advocate

Is it possible somehow select single objects which are inside of a block?

 

If ssget can select only primary entity, what means this ":V" option? I've tried it but it not works. What is it for if not select subentity inside the block? 

  • (ssget "_:V") - force subentity selection

 

This is the detailed description. 

:V Forces subentity selection. Treats all interactive, graphic selections performed by the user as subentity selections. The returned selection set contains subentities only. This option cannot be combined with the duplicate (":D") or nested (":N") selection modes. This option is supported only with interactive selections, such as window and crossing. It is not supported for all, filtered, or group selections.

0 Likes
Accepted solutions (1)
2,203 Views
23 Replies
Replies (23)
Message 21 of 24

Moshe-A
Mentor
Mentor

@eakos1 ,

 

i don't know about yours,  mine works 100% 😀

 

 

 

(defun c:test (/ Ent pt ss)

 (if (and
       (setq Ent (nentsel))
       (setq pt (cadr Ent))
       (setq ss (ssget pt))
     )
  (progn
   ; (vla-get-length (vlax-ename->vla-object (cdr (car (cdr (cdr (entget (car (ssname ss 0)))))))))
    
   (terpri) 
   (princ (vla-get-length (vlax-ename->vla-object (ssname ss 0))))
  )
 )

 (princ) 
)

 

 

 

0 Likes
Message 22 of 24

john.uhden
Mentor
Mentor

@eakos1 ,

I like your perseverence.

That's all because nentsel is short for NestedENTitySELection.  Like if you are aiming for a block and hit an attribute, you will primarily get the attribute.

John F. Uhden

0 Likes
Message 23 of 24

john.uhden
Mentor
Mentor

@eakos1 ,

Well, at least you could replace (cdr (cdr with just (cddr.

Hmm, and I think you can replace 

(car (cdr (cdr
with just (caddr

 

John F. Uhden

0 Likes
Message 24 of 24

Moshe-A
Mentor
Mentor

John,

 

liked your vibe 😀😀😀

 

Good Night

 

 

0 Likes