Jump to content

How: select all entities of an "unnamed" group by selecting a part of it


handasa

Recommended Posts

Greetings every one ...

i have an unnamed Groups through the drawing ... i want to apply some lisp every single group to all of its entities ...

 

i need some way to get a selection set of all the group entities by selecting only part of it BY "fence" method ... knowing that the groups are "unnamed"

 

...

thanks for reading

Edited by handasa
Link to comment
Share on other sites

A start for you

 

(setq mygroups(vla-get-groups (vla-get-activedocument (vlax-get-acad-object) )))
(setq grpp (VLA-item mygroups 1)) ; 1 is second item starts at zero
Command: (vlax-dump-object grpp)
; IAcadGroup: A named SelectionSet object
; Property values:
;   Application (RO) = #<VLA-OBJECT IAcadApplication 000000013fba3f10>
;   Count (RO) = 4
;   Document (RO) = #<VLA-OBJECT IAcadDocument 00000000302b3398>
;   Handle (RO) = "129E4"
;   HasExtensionDictionary (RO) = 0
;   Layer (RO) = ...Indexed contents not shown...
;   Linetype (RO) = ...Indexed contents not shown...
;   LinetypeScale (RO) = ...Indexed contents not shown...
;   Lineweight (RO) = ...Indexed contents not shown...
;   Material (RO) = ...Indexed contents not shown...
;   Name = "*A2"
;   ObjectID (RO) = 46
;   ObjectName (RO) = "AcDbGroup"
;   OwnerID (RO) = 44
;   PlotStyleName (RO) = ...Indexed contents not shown...
;   TrueColor (RO) = ...Indexed contents not shown...
;   Visible (RO) = ...Indexed contents not shown...

Link to comment
Share on other sites

Maybe:

(defun _groupedenames (ename / e)
 (if (and (= 'ename (type ename))
   (setq e (cdr (member '(102 . "{ACAD_REACTORS") (entget ename))))
   (setq e (cdr (assoc 330 e)))
   (equal (cdr (assoc 0 (entget e))) "GROUP")
   (setq e (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= 340 (car x))) (entget e))))
     )
   e
 )
)
;; (mapcar '(lambda (x) (redraw x 3) x) (_groupedenames (car (entsel "Pick something"))))

Link to comment
Share on other sites

thanks all for your help ... i ended with setting var "pickstyle" to 1 while selecting a part of the group to select the whole group then setting the "pickstyle" again to 0 .. and it did the trick ... thanks again and best regards

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