擅长:python、mysql、java
<p>我通常使用<code>FilteredElementCollector</code>方法,将其包装在Python <code>list</code>中。然后,您可以组合、细化、拆分、复制、排序—基本上可以使用Python提供的所有便利来完成任何您想做的事情</p>
<p>对于上面的问题,您可以创建<code>FilteredElementCollector</code>,并根据需要将其拆分为列表:</p>
<pre><code>rawWalls = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Walls)
Col1 = list(rawWalls)
print 'There are',len(Col1),'wall types+instances in Col1'
Col2 = list(rawWalls.WhereElementIsNotElementType().ToElements())
print 'There are',len(Col2),'wall instances in Col2'
</code></pre>