<?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: See Grouptype member elements without an instance present in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/see-grouptype-member-elements-without-an-instance-present/m-p/7643832#M53915</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is another trick with temporary transactions, that can help you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can temporary delete your group type. Look at this is RevitPythonShell script code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;elem = selection[0] # select group type in project browser before running this

t = Transaction(doc, "temp")
t.Start()

ids = doc.Delete(elem.Id)

t.RollBack()

for id in ids:
	print id, doc.GetElement(id)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you don't commit the transaction, it works very quick.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use this approach if there are no group instances. If there are any, you can just get first Group in GroupType.Groups and get member ids via group.GetMemberIds() method&lt;/P&gt;</description>
    <pubDate>Fri, 22 Dec 2017 07:15:55 GMT</pubDate>
    <dc:creator>aignatovich</dc:creator>
    <dc:date>2017-12-22T07:15:55Z</dc:date>
    <item>
      <title>See Grouptype member elements without an instance present</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/see-grouptype-member-elements-without-an-instance-present/m-p/7627637#M53912</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to somehow inquire about the elements inside a grouptype without having any instances of that group in the model? Specifically I need to look up if the GroupType contains any elements from one specific family and where these are positioned inside the group.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that it is possible to place an instance of that GroupType into the model, read the member elements and delete it afterwards. However this method needs transactions and gets quite slow, because I need to do this through Dynamo nodes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Taavi&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 16:32:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/see-grouptype-member-elements-without-an-instance-present/m-p/7627637#M53912</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-15T16:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: See Grouptype member elements without an instance present</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/see-grouptype-member-elements-without-an-instance-present/m-p/7634568#M53913</link>
      <description>&lt;P&gt;No replies?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does it mean no-one knows how to do it or it is simply not possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Taavi&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2017 10:17:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/see-grouptype-member-elements-without-an-instance-present/m-p/7634568#M53913</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-19T10:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: See Grouptype member elements without an instance present</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/see-grouptype-member-elements-without-an-instance-present/m-p/7641539#M53914</link>
      <description>&lt;P&gt;I'm afraid the answer is "not yet". You have to create an instance in an temporary transaction then get the elements type then roll back the transaction.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 12:42:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/see-grouptype-member-elements-without-an-instance-present/m-p/7641539#M53914</guid>
      <dc:creator>Mustafa.Salaheldin</dc:creator>
      <dc:date>2017-12-21T12:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: See Grouptype member elements without an instance present</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/see-grouptype-member-elements-without-an-instance-present/m-p/7643832#M53915</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is another trick with temporary transactions, that can help you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can temporary delete your group type. Look at this is RevitPythonShell script code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;elem = selection[0] # select group type in project browser before running this

t = Transaction(doc, "temp")
t.Start()

ids = doc.Delete(elem.Id)

t.RollBack()

for id in ids:
	print id, doc.GetElement(id)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you don't commit the transaction, it works very quick.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use this approach if there are no group instances. If there are any, you can just get first Group in GroupType.Groups and get member ids via group.GetMemberIds() method&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2017 07:15:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/see-grouptype-member-elements-without-an-instance-present/m-p/7643832#M53915</guid>
      <dc:creator>aignatovich</dc:creator>
      <dc:date>2017-12-22T07:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: See Grouptype member elements without an instance present</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/see-grouptype-member-elements-without-an-instance-present/m-p/7650869#M53916</link>
      <description>&lt;P&gt;Thanks for the answers. These seem like good options, but it seems that in my case it is easier to just require that all groupTypes have an instance in the model and go from that.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 18:21:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/see-grouptype-member-elements-without-an-instance-present/m-p/7650869#M53916</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-27T18:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: See Grouptype member elements without an instance present</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/see-grouptype-member-elements-without-an-instance-present/m-p/9239656#M53918</link>
      <description>&lt;P&gt;Apologies, it was a different issue.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 09:03:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/see-grouptype-member-elements-without-an-instance-present/m-p/9239656#M53918</guid>
      <dc:creator>Mark.Ackerley</dc:creator>
      <dc:date>2020-01-09T09:03:35Z</dc:date>
    </item>
  </channel>
</rss>

