handasa Posted June 19, 2017 Share Posted June 19, 2017 (edited) 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 June 19, 2017 by handasa Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 20, 2017 Share Posted June 20, 2017 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... Quote Link to comment Share on other sites More sharing options...
ronjonp Posted June 20, 2017 Share Posted June 20, 2017 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")))) Quote Link to comment Share on other sites More sharing options...
handasa Posted June 21, 2017 Author Share Posted June 21, 2017 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.