<?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: Dynamo: Listing per Element in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/dynamo-listing-per-element/m-p/10928391#M21019</link>
    <description>&lt;P&gt;Thanks for the input.&amp;nbsp; That is exactly what I was looking for.&amp;nbsp; I did try the code as you wrote it but I am getting a undefined name so I will have to play with the syntax to see if I can figure it out.&amp;nbsp; If someone sees the issue before I can catch it, please let me know.&amp;nbsp; Thanks again&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sublist.jpg" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1020707iA7E7A340124CE934/image-size/large?v=v2&amp;amp;px=999" role="button" title="sublist.jpg" alt="sublist.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Feb 2022 12:30:31 GMT</pubDate>
    <dc:creator>mdugas</dc:creator>
    <dc:date>2022-02-04T12:30:31Z</dc:date>
    <item>
      <title>Dynamo: Listing per Element</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/dynamo-listing-per-element/m-p/10926517#M21017</link>
      <description>&lt;P&gt;I am working with a custom node that returns all the Ancillary Ids of the Elements selected.&amp;nbsp; My issue is that it just creates a single list of all parameters.&amp;nbsp; Since each Element can have a different number of Ancillary Ids, I need to list these per Element.&amp;nbsp; Then I can access them per list, per index number. Below I have only added the List.Chop node to show how I need the list from the Python Script to look; that is not intended to be part of the script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="python list.JPG" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1020335iE3BDAC7A8E1C888E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="python list.JPG" alt="python list.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand the append is just adding the next Ancillary Id to the list.&amp;nbsp; But I am struggling to find a way to break up the list per Element as I need?&amp;nbsp; Not sure if I need to use a Count or maybe create a second list???&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="ancillary node.JPG" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1020336i959FC07DECAECD04/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ancillary node.JPG" alt="ancillary node.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 16:36:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/dynamo-listing-per-element/m-p/10926517#M21017</guid>
      <dc:creator>mdugas</dc:creator>
      <dc:date>2022-02-03T16:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamo: Listing per Element</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/dynamo-listing-per-element/m-p/10927405#M21018</link>
      <description>&lt;P&gt;Create another list that you append Ancillaries to inside your for loop.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;for element in elements:
    Ancillary = element.GetPartAncillaryUsage()
    sub_list = []
    for ancillaryIds in Ancillary:
        ancillaryId = ancillaryIds.AncillaryId
        sublist.append(ancillaryId)
    Ancillary.append(sublist)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 23:20:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/dynamo-listing-per-element/m-p/10927405#M21018</guid>
      <dc:creator>stewart_skyler</dc:creator>
      <dc:date>2022-02-03T23:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamo: Listing per Element</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/dynamo-listing-per-element/m-p/10928391#M21019</link>
      <description>&lt;P&gt;Thanks for the input.&amp;nbsp; That is exactly what I was looking for.&amp;nbsp; I did try the code as you wrote it but I am getting a undefined name so I will have to play with the syntax to see if I can figure it out.&amp;nbsp; If someone sees the issue before I can catch it, please let me know.&amp;nbsp; Thanks again&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sublist.jpg" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1020707iA7E7A340124CE934/image-size/large?v=v2&amp;amp;px=999" role="button" title="sublist.jpg" alt="sublist.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 12:30:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/dynamo-listing-per-element/m-p/10928391#M21019</guid>
      <dc:creator>mdugas</dc:creator>
      <dc:date>2022-02-04T12:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamo: Listing per Element</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/dynamo-listing-per-element/m-p/10928537#M21020</link>
      <description>&lt;P&gt;I was able to remove the underscore in line 36 and get the error cleared but now I have a new error.&amp;nbsp; Again I am using the wrong syntax because it looks like it is looking for the attribute "append" which does not exist.&amp;nbsp; I am just trying to list the ancillary Id's per element...&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sub list 2.jpg" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1020751i5645BE900EFC16B3/image-size/large?v=v2&amp;amp;px=999" role="button" title="sub list 2.jpg" alt="sub list 2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 13:23:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/dynamo-listing-per-element/m-p/10928537#M21020</guid>
      <dc:creator>mdugas</dc:creator>
      <dc:date>2022-02-04T13:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamo: Listing per Element</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/dynamo-listing-per-element/m-p/10928856#M21021</link>
      <description>&lt;P&gt;Ah, sorry, I just retyped your code out on the spot, looks like I made a mistake. "Ancillary.append" should be "Ancillaries.append"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically what's happening is instead of appending to the python list you made on line 26, I was trying to use the python method of "append" on an &lt;A href="https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.icollection-1?view=net-6.0" target="_blank" rel="noopener"&gt;iCollection&lt;/A&gt;, which, of course, doesn't work because iCollections don't have an append method.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Also, make sure you unindent "Ancillaries.append" otherwise you'll end up with the same output, just nested in another list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;for element in elements:
    Ancillary = element.GetPartAncillaryUsage()
    sublist = []
    for ancillaryIds in Ancillary:
        ancillaryId = ancillaryIds.AncillaryId
        sublist.append(ancillaryId)
    Ancillaries.append(sublist)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 15:03:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/dynamo-listing-per-element/m-p/10928856#M21021</guid>
      <dc:creator>stewart_skyler</dc:creator>
      <dc:date>2022-02-04T15:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamo: Listing per Element</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/dynamo-listing-per-element/m-p/10929031#M21022</link>
      <description>&lt;P&gt;Once again you have been a big help!&amp;nbsp; If I can be so bold as to ask for one more piece of advice?&amp;nbsp; Besides the ancillary ID, there are 5 more pieces of info I need to report in my list from this same element.&amp;nbsp; Should I attempt to pull all the items with the same script, or alter the script and run separate scripts for each piece of data I need?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: I want to pull 6 pieces of data from each ancillary.&amp;nbsp; Is it easier to work with the data from one script where the 6 pieces are just in a single row divided by commas OR alter the script 6 times to report the same data for each element separately and pull from the individual lists later when I put this info into shared parameters?&amp;nbsp; I am concerned that having all the data in one row and not indexed may be a pain later on....&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 16:09:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/dynamo-listing-per-element/m-p/10929031#M21022</guid>
      <dc:creator>mdugas</dc:creator>
      <dc:date>2022-02-04T16:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamo: Listing per Element</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/dynamo-listing-per-element/m-p/10929204#M21023</link>
      <description>&lt;P&gt;This is a bit harder to answer without knowing what exactly you're trying to accomplish. I personally tend to pull all the data at the same time, if I can, but there are always exceptions.&amp;nbsp;Part of coding is learning different ways to deal with and manage your data, and what the best way to do it is for each application. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 17:09:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/dynamo-listing-per-element/m-p/10929204#M21023</guid>
      <dc:creator>stewart_skyler</dc:creator>
      <dc:date>2022-02-04T17:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamo: Listing per Element</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/dynamo-listing-per-element/m-p/10929257#M21024</link>
      <description>&lt;P&gt;I get it..&amp;nbsp; Thanks again for the help.&amp;nbsp; Much appreciated&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 17:34:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/dynamo-listing-per-element/m-p/10929257#M21024</guid>
      <dc:creator>mdugas</dc:creator>
      <dc:date>2022-02-04T17:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamo: Listing per Element</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/dynamo-listing-per-element/m-p/10929273#M21025</link>
      <description>&lt;P&gt;No problem. Best of luck on the rest of your script!&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 17:43:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/dynamo-listing-per-element/m-p/10929273#M21025</guid>
      <dc:creator>stewart_skyler</dc:creator>
      <dc:date>2022-02-04T17:43:44Z</dc:date>
    </item>
  </channel>
</rss>

