PPT_LOGO_4b
Revit Programming Introduction <#>
Copyright © 2009 Autodesk Inc.
カテゴリーの全てのシンボルをリスト
•Dim dictFamilyToSymbols As New Dictionary(Of String, ArrayList)
• 
•' using Revit 2009 element filtering
•Dim families As List(Of Revit.Element) = New List(Of Revit.Element)
•Dim filter As Revit.Filter = app.Create.Filter.NewTypeFilter(GetType(Family))
• 
•Dim nRetVal = doc.Elements(filter, families)
•Dim f As Family
•Dim categoryMatches = False
•For Each f In families
•    categoryMatches = False
•    If (f.FamilyCategory Is Nothing) Then ' not always implemented
•        For Each sym As FamilySymbol In f.Symbols _
•            categoryMatches = sym.Category.Id.Equals(instCat.Id)
•            Exit For
•        Next
•    Else
•        categoryMatches = f.FamilyCategory.Id.Equals(instCat.Id)
•    End If
• 
•    If (categoryMatches) Then
•        Dim familySymbols As New ArrayList
•        For Each sym As FamilySymbol In f.Symbols
•            familySymbols.Add(sym)
•        Next
•        dictFamilyToSymbols.Add(f.Name, familySymbols)
•    End If
•Next
• 
ファミリーとタイプ
カテゴリーの全てのシンボルをリストするサンプルコードになります。