PPT_LOGO_4b
Revit Programming Introduction <#>
Copyright © 2009 Autodesk Inc.
ファミリ ーシンボル イテレーション
•// Loop through the collection of families, and now look at
•// the child symbols (types) as well. These symbols can be
•// used to determine the family category.
•foreach( Family f in families )
•{
•  string catName;
•  bool first = true;
•  // Loop all contained symbols (types)
•  foreach( FamilySymbol symb in f.Symbols )
•  {
•    // you can determine the family category
•    // from its first symbol.
•    if( first )
•    {
•      first = false;
•      catName = symb.Category.Name;
•      sMsg = "Family: Name=" + f.Name
•        + "; Id=" + f.Id.Value.ToString()
•        + "; Category=" + catName
•        + "\r\nContains Types:";
•    }
•    sMsg += "\r\n    " + symb.Name + "; Id=" + symb.Id.Value.ToString();
•  }
•  // Show the symbols for this family and allow user to proceed
•  // to the next family (OK) or cancel (Cancel)
•  sMsg += "\r\nContinue?";
•  if( !LabUtils.QuestionMsg( sMsg ) )
•  {
•    break;
•  }
•}
ファミリーとタイプ
Labs_3_1_02.png
さらに、個々のファミリーに存在する全てのタイプ(シンボル)を表示します。