この内容は古いバージョンです。最新バージョンを表示するには、戻るボタンを押してください。
バージョン:3
ページ更新者:atom
更新日時:2026-05-13 06:45:58

タイトル: よく使うBuiltInCategoryの一覧
SEOタイトル: 【Revit API】よく使うBuiltInCategoryの一覧

Revit API でフィルタや要素取得を行う際に必須となる BuiltInCategory の代表値をまとめた一覧です。Revit本体の組み込みカテゴリ(ドア・壁・窓・床など)を識別する列挙型で、FilteredElementCollector と組み合わせて使用します。

順次追加してください。

主なBuiltInCategory

BuiltInCategory対象要素
OST_Doorsドア
OST_Walls
OST_Windows
OST_Floors
OST_Roofs屋根
OST_Ceilings天井
OST_Stairs階段
OST_Rampsスロープ
OST_Railings手摺
OST_Furniture家具
OST_Columns
OST_StructuralColumns構造柱
OST_StructuralFraming構造フレーム(梁等)
OST_StructuralFoundation構造基礎
OST_GenericModel汎用モデル
OST_Rooms部屋
OST_Areas面積
OST_Levelsレベル(階)
OST_Grids通り芯
OST_Viewsビュー
OST_Sheetsシート
OST_TextNotesテキスト注釈
OST_Dimensions寸法線
OST_Lines
OST_PipeCurves配管
OST_DuctCurvesダクト
OST_CableTrayケーブルトレイ
OST_Conduit電線管
OST_LightingFixtures照明器具
OST_MechanicalEquipment機械設備
OST_ElectricalEquipment電気設備
OST_PlumbingFixtures衛生器具

使い方の基本(C# Revit API)

// 現在のドキュメントから全ての「壁」を取得
FilteredElementCollector collector = new FilteredElementCollector(doc);
ICollection walls = collector
    .OfCategory(BuiltInCategory.OST_Walls)
    .WhereElementIsNotElementType()
    .ToElements();

// ドアを取得
var doors = new FilteredElementCollector(doc)
    .OfCategory(BuiltInCategory.OST_Doors)
    .WhereElementIsNotElementType()
    .ToElements();

BuiltInCategory の調べ方

  • Revit SDK のドキュメントRevitAPI.chm)の BuiltInCategory 列挙型を参照
  • Snoop Database(RevitLookup)で実行時に要素のカテゴリIDを確認
  • 要素から逆引きする場合は element.Category.Id.IntegerValue(BuiltInCategory) でキャスト

注意点

  • Revitバージョンによって新規追加・統合・名称変更がある。古いコードを新バージョンで動かすときに OST_XXX が見つからないことがある
  • OfCategory(BuiltInCategory.OST_XXX) はカテゴリ単位のフィルタ。サブカテゴリはこれだけでは絞り込めない
  • WhereElementIsNotElementType() を入れないと、その型(FamilySymbol)も結果に混じる

関連