<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Copying Nested Groups in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/copying-nested-groups/m-p/10208240#M80814</link>
    <description>&lt;P&gt;Although I do think that #2 is quite a good solution, here is another one.&lt;/P&gt;
&lt;P&gt;It's a LISP. Look&amp;nbsp;&lt;A href="http://www.lee-mac.com/runlisp.html" target="_self"&gt;HERE&lt;/A&gt;&amp;nbsp; in case you don't know what to do with it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run the lisp first, pick an object, select a group. It stays pre-selected for the next job.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(vl-load-com)
(defun c:SelectNestedGroup ( / e d s l e done)
  
  (if (and (setq e (car (entsel)))
	   (setq d (entget e))
	   (setq d (member '(102 . "{ACAD_REACTORS") d))
	   (setq d (mapcar 'cdr (vl-remove-if-not
				  '(lambda (x) (and (= (car x) 330)
						    (= (cdr (assoc 0 (entget (cdr x)))) "GROUP")))
				  d)))
	   (princ (strcat "\nObject is part of " (itoa (length d)) " group/s."))
	   (setq s (ssadd))
	   )
    (while (and (setq l (mapcar 'cdr (vl-remove-if-not (function (lambda (x) (= (car x) 340))) (entget (car d)))))
		(&amp;gt; (length d) 1)
		(not done)
		)
      (foreach e l (redraw e 3))
      (initget "Yes")
      (if (getkword "\nSelect this group [Yes, please] : ")
	(setq done T)
	(setq d (cdr d)))
      (foreach e l (redraw e 4))))
  (if l (sssetfirst nil (foreach e l (ssadd e s))))
  (princ)
  )
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Apr 2021 19:09:45 GMT</pubDate>
    <dc:creator>ВeekeeCZ</dc:creator>
    <dc:date>2021-04-02T19:09:45Z</dc:date>
    <item>
      <title>Copying Nested Groups</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/copying-nested-groups/m-p/10207807#M80813</link>
      <description>&lt;P&gt;Here's the scenario:&lt;/P&gt;&lt;P&gt;I have several groups mixed in a common area shared with "loose" geometry.&amp;nbsp; I group those groups, along with the loose geometry into a single group.&amp;nbsp; So now I have a group that contains sub-groups.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Say I now want to copy one of those sub-groups to another place in the drawing.&amp;nbsp; As far as I know, I have two options.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 - Ungroup the conglomeration, copy my desired sub-group, then re-group the collection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2 - with Pickstyle set to 1, select one item.&amp;nbsp; It selects the entire collection, but also gives a grip for the sub-group that object belongs to.&amp;nbsp; Using Ctl+Pick Grip, I can copy that sub-group out of the collection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a better way than either of these two methods?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 15:57:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/copying-nested-groups/m-p/10207807#M80813</guid>
      <dc:creator>akaterr55</dc:creator>
      <dc:date>2021-04-02T15:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Copying Nested Groups</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/copying-nested-groups/m-p/10208240#M80814</link>
      <description>&lt;P&gt;Although I do think that #2 is quite a good solution, here is another one.&lt;/P&gt;
&lt;P&gt;It's a LISP. Look&amp;nbsp;&lt;A href="http://www.lee-mac.com/runlisp.html" target="_self"&gt;HERE&lt;/A&gt;&amp;nbsp; in case you don't know what to do with it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run the lisp first, pick an object, select a group. It stays pre-selected for the next job.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(vl-load-com)
(defun c:SelectNestedGroup ( / e d s l e done)
  
  (if (and (setq e (car (entsel)))
	   (setq d (entget e))
	   (setq d (member '(102 . "{ACAD_REACTORS") d))
	   (setq d (mapcar 'cdr (vl-remove-if-not
				  '(lambda (x) (and (= (car x) 330)
						    (= (cdr (assoc 0 (entget (cdr x)))) "GROUP")))
				  d)))
	   (princ (strcat "\nObject is part of " (itoa (length d)) " group/s."))
	   (setq s (ssadd))
	   )
    (while (and (setq l (mapcar 'cdr (vl-remove-if-not (function (lambda (x) (= (car x) 340))) (entget (car d)))))
		(&amp;gt; (length d) 1)
		(not done)
		)
      (foreach e l (redraw e 3))
      (initget "Yes")
      (if (getkword "\nSelect this group [Yes, please] : ")
	(setq done T)
	(setq d (cdr d)))
      (foreach e l (redraw e 4))))
  (if l (sssetfirst nil (foreach e l (ssadd e s))))
  (princ)
  )
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 19:09:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/copying-nested-groups/m-p/10208240#M80814</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2021-04-02T19:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Copying Nested Groups</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/copying-nested-groups/m-p/10212300#M80815</link>
      <description>&lt;P&gt;Hey Z9,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for posting your reply.&amp;nbsp; Your Lisp works very well!&amp;nbsp; I will be using it often.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;-Mark&lt;/P&gt;</description>
      <pubDate>Mon, 05 Apr 2021 12:40:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/copying-nested-groups/m-p/10212300#M80815</guid>
      <dc:creator>akaterr55</dc:creator>
      <dc:date>2021-04-05T12:40:28Z</dc:date>
    </item>
  </channel>
</rss>

